Lid |
|
Beste Sitemasters,
Sinds gister ben ik begonnen met een nieuwe soort criminal game, maar nu kwam ik aan bij het bank gedeelte, maa die wilt niet echt goed werken. Kan iemand mij vertellen wat ik verkeerd doe (Dit is enkel geld afhalen)
voorbeeld: http://91.196.169.84/~crime
login: test
pass: test
<?php
include("_settings.php");
if(isset($_SESSION['suser'])) {
$query = mysql_query("select * from users where name='".$_SESSION['suser']."'") or die (mysql_error());
while($row = mysql_fetch_array($query))
{
?>
<center><table border="0" width="50%">
<tr>
<td colspan="2">
Welcome to Castlewar bank, this bank is owned by: <i>Nobody</i>, Here you can do all your financial business!
</td>
</tr>
<tr>
<td width="10%" align="left">
On the bank:<br>
In your pocket:</td>
<td width="40%" align="left">€ <?php echo $row["bank"]; ?><br>
€ <?php echo $row["cash"]; ?></td>
</tr>
</table></center>
<center><form method="POST">
<input type="text" name="geld" value=""><br>
<input type="submit" name="cash2" value="Pinnen">
<input type="submit" name="bank" value="Storten"></form></center>
<?php
$cash = $row["cash"];
$cash1 = $_POST['geld'];
$newsaldo = $cash + $cash1;
$bank = $row["bank"];
$newbank = $bank - $cash1;
if (isset($_POST['cash2'])){
mysql_query("UPDATE users SET bank='".$newbank."', cash='".$newsaldo."' WHERE name=".$row["id"]) or die(mysql_error());
echo "Saldo changed!";
}
?>
<?php } } ?>
<?php include("_settings.php"); if(isset($_SESSION['suser'])) { { ?> <center><table border="0" width="50%"> <tr> <td colspan="2"> Welcome to Castlewar bank, this bank is owned by: <i>Nobody</i>, Here you can do all your financial business! </td> </tr> <tr> <td width="10%" align="left"> On the bank:<br> In your pocket:</td> <td width="40%" align="left">€ <?php echo $row["bank"]; ?><br> € <?php echo $row["cash"]; ?></td> </tr> </table></center> <center><form method="POST"> <input type="text" name="geld" value=""><br> <input type="submit" name="cash2" value="Pinnen"> <input type="submit" name="bank" value="Storten"></form></center> <?php $cash = $row["cash"]; $cash1 = $_POST['geld']; $newsaldo = $cash + $cash1; $bank = $row["bank"]; $newbank = $bank - $cash1; if (isset($_POST['cash2'])){ } ?> <?php } } ?>
|