PHP interesse |
|
Het onderstaande script wordt volgens mij niet goed afgesloten of er zit een fout in, want als ik het open dan wordt het rechter menu van mijn layout menu niet meer weergeven.
Zou iemand mij kunnen vertellen wat er hier fout gaat en hoe dit is op te lossen?
Het script wordt geladen door index.php?a=casino
<div id="contentbar_main">
<div id="notice_container"></div>
<div id="cbs">
<div align="center">
<img src="images/game/50picture.jpg" border=0 width="100%">
</div>
<div id="cbs">
<div class="cb">
<h1><?=$casino5050_1;?></h1>
<p>
</p>
<table align="center" width="100%">
<tr>
<td >
<?=$casino5050_2;?><br>
<?=$casino5050_3;?>
</td>
</tr>
<form method="POST">
<tr>
<td align="left">
<input maxlength="13" type="text" name="inzet">
<input class="2" type="submit" value="<?=$casino5050_4;?>">
</td>
</tr>
</form>
<?
if(isset($_POST['inzet']))
{
$kans = rand(1,2);
if($data->contant < $_POST['inzet'])
{
print"<tr><td align=\"center\">$misc_3</td></tr>";
}
else if(!preg_match('/^[0-9]{1,15}$/',$_POST['inzet']))
{
print"<tr><td align=\"center\">$misc_4</td></tr>";
}
else if($kans == 1)
{
mysql_query("UPDATE `users` SET `contant`=`contant`-'{$_POST['inzet']}' WHERE `login`='{$data->login}'");
print"<tr><td align=\"center\">$misc_5</td></tr>";
}
else if($kans == 2)
{
mysql_query("UPDATE `users` SET `contant`=`contant`+'{$_POST['inzet']}*2' WHERE `login`='{$data->login}'");
print"<tr><td align=\"center\">$misc_6</td></tr>";
}
}
?>
</table>
</div>
</div>
</div>
<div id="contentbar_main"> <div id="notice_container"></div> <div id="cbs"> <div align="center"> <img src="images/game/50picture.jpg" border=0 width="100%"> </div> <div id="cbs"> <div class="cb"> <h1><?=$casino5050_1;?></h1> <p> </p> <table align="center" width="100%"> <tr> <td > <?=$casino5050_2;?><br> <?=$casino5050_3;?> </td> </tr> <form method="POST"> <tr> <td align="left"> <input maxlength="13" type="text" name="inzet"> <input class="2" type="submit" value="<?=$casino5050_4;?>"> </td> </tr> </form> <? if(isset($_POST['inzet'])) { if($data->contant < $_POST['inzet']) { print"<tr><td align=\"center\">$misc_3</td></tr>"; } else if(!preg_match('/^[0-9]{1,15}$/',$_POST['inzet'])) { print"<tr><td align=\"center\">$misc_4</td></tr>"; } else if($kans == 1) { mysql_query("UPDATE `users` SET `contant`=`contant`-'{$_POST['inzet']}' WHERE `login`='{$data->login}'"); print"<tr><td align=\"center\">$misc_5</td></tr>"; } else if($kans == 2) { mysql_query("UPDATE `users` SET `contant`=`contant`+'{$_POST['inzet']}*2' WHERE `login`='{$data->login}'"); print"<tr><td align=\"center\">$misc_6</td></tr>"; } } ?> </table> </div> </div> </div>
Alvast bedankt
|