Thread: Kritter Kingdom
View Single Post
  #22  
Old 03-15-2010, 10:27 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 6,323
Magnie
Send a message via ICQ to Magnie
Default RE: Kritter Kingdom

What's the exact error? I'm not getting an error when I try it. But you are right it isn't giving the money... ( What's the 'cash' column in the user's table again? But anyways, change all the 'money' to the one in the Database.)

Change givemoney2.php:

PHP Code:
$cashs $cash $gm;
$cashs2 $cash2 $cash;
if(
$gm !> $cash){
$query "UPDATE ".$prefix."users SET money='".$cashs."' WHERE username='".$loggedinname."'";

mysql_query($query);
$query "UPDATE ".$prefix."users SET money='".$cashs2."' WHERE username='".$user."'";

mysql_query($query);
$article_content "[Put a nice message of it's success]";

To:

PHP Code:
$cashs $cash $gm;
$cashs2 $cash2 $gm;
if(
$gm !> $cash){
$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs.'\' WHERE `'.$prefix.'users`.`username` = '.$loggedinname.';';
mysql_query($query);

$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs2.'\' WHERE `'.$prefix.'users`.`username` = '.$user.';';
mysql_query($query);

$article_content "[Put a nice message of it's success]";

Try that...
Reply With Quote