Demonicman
11-09-2008, 08:29 AM
Here is my code:
<?php
if(isset($New))
{
if($New=="Join Castles Bank"){
if($User[Gold]>'9999999'){
mysql_query("Update Users set Gold=Gold-'10000000' where ID='$Player'") or die("Could not find player stats");
mysql_query("Update Users set BankChoice='Cas' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Castles Bank! As a reminder, all of your deposits cost 5% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}elseif($New=="Join Hells Bank"){
if($User[Gold]>'99999999'){
mysql_query("Update Users set Gold=Gold-'100000000' where ID='$Player'") or die("Could not find player stats");
mysql_query("Update Users set BankChoice='Hell' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Hells Bank! As a reminder, all of your deposits cost 10% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}elseif($New=="Join Apocalyptic Bank"){
if($User[Gold]>'999999999'){
mysql_query("Update Users set Gold=Gold-'1000000000' where ID='$Player'") or die "Could not find player stats");
mysql_query("Update Users set BankChoice='Apoc' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Apocalyptic Bank! As a reminder, all of your deposits cost 25% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}
}
?>
I know I code it weird because sometimes im too lazy to write the quotes, however it normaly works the way that I do it. Im afraid ive gone over it again and again and cannot figure out the problem. I tried error reporting and it just gives me a blank screen...
PS, FOUND IT, MISSING A ( IN ONE OF THE MYSQL QUERIES, CASE CLOSED
<?php
if(isset($New))
{
if($New=="Join Castles Bank"){
if($User[Gold]>'9999999'){
mysql_query("Update Users set Gold=Gold-'10000000' where ID='$Player'") or die("Could not find player stats");
mysql_query("Update Users set BankChoice='Cas' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Castles Bank! As a reminder, all of your deposits cost 5% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}elseif($New=="Join Hells Bank"){
if($User[Gold]>'99999999'){
mysql_query("Update Users set Gold=Gold-'100000000' where ID='$Player'") or die("Could not find player stats");
mysql_query("Update Users set BankChoice='Hell' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Hells Bank! As a reminder, all of your deposits cost 10% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}elseif($New=="Join Apocalyptic Bank"){
if($User[Gold]>'999999999'){
mysql_query("Update Users set Gold=Gold-'1000000000' where ID='$Player'") or die "Could not find player stats");
mysql_query("Update Users set BankChoice='Apoc' where ID='$Player'") or die("Could not find player stats");
echo "Congratulations, you just joined the Apocalyptic Bank! As a reminder, all of your deposits cost 25% which goes to the bank. <a href=bank.php>Start Banking</a>";
exit;
}else{
echo "You can not join this bank at the moment. Please make more money first. <a href=bank.php>Go back</a>";
exit;
}
}
}
?>
I know I code it weird because sometimes im too lazy to write the quotes, however it normaly works the way that I do it. Im afraid ive gone over it again and again and cannot figure out the problem. I tried error reporting and it just gives me a blank screen...
PS, FOUND IT, MISSING A ( IN ONE OF THE MYSQL QUERIES, CASE CLOSED