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...