corkg Posted July 23, 2007 Share Posted July 23, 2007 I have some code and it is for a roulette wheel, when you open the page in IE the layout is wrong, when you win the layout goes wrong, yet for some reason when you lose the layout looks like it is suppose to, i have removed some of the code if you need more just ask please help. Why does it do this? $yougot = $nmoney - $bet; if ($yougot <= 0){ $lala = $usersmoney - $bet; $ownersmoney = $ownersmoney1 + $bet; mysql_query("UPDATE users SET money='$ownersmoney' WHERE username='$owner'"); mysql_query("UPDATE users SET money='$lala' WHERE username='$username'"); $new_money = $bet * $win; $ear = $Roulette->profit + $bet; mysql_query("UPDATE casinos SET profit='$ear' WHERE location='$fetch->location' AND casino='Roulette'"); ?> <div align='center'> <table width=30% cellpadding=2 cellspacing=0> <tr> <td align=center><strong>The Winning Wheel Number was <?php echo "$number"; ?></strong></td> </tr> <tr> <td>Unlucky, you lost £<? echo" $bet"; ?> <? }elseif ($yougot > 0){ ?> </td> </tr> </table> </div> <div align="center"> <table width=30% align="center" cellpadding=2 cellspacing=0> <tr > <td height="23" align=center >Wheel Number <?php echo "$number"; ?> Won!</td> </tr> <tr> <td><div align="center">Congratulations you won £<? echo" $nmoney"; ?> </div></td> </tr> <tr> <td><? if ($nmoney > $ownersmoney1){ $lost ='1'; $ownersmoney = $money1; }elseif ($nmoney <= $ownersmoney1){ $lost = '0'; } if ($lost == '1'){ $lala = $usersmoney + $bet; $ownersmoney = $ownersmoney1 - $nmoney; echo "The owner of the table is bankrupt there is no more money to pay out."; mysql_query("UPDATE users SET money='$lala' WHERE username='$username'"); mysql_query("UPDATE users SET money='0' WHERE username='$owner'"); }elseif ($lost == '0'){ $ownersmoney = $ownersmoney1 - $nmoney; $winermoney = $usersmoney + $nmoney; mysql_query("UPDATE users SET money='$ownersmoney' WHERE username='$owner'"); mysql_query("UPDATE users SET money='$winermoney' WHERE username='$username'"); $ear = $Roulette->profit - $bet; mysql_query("UPDATE casinos SET profit='$ear' WHERE location='$fetch->location' AND casino='Roulette'"); echo ""; } } } }}}} ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.