mysql_query("UPDATE bizgame_players SET money = money + $Price where id='".$PlayerID."'") or die(mysql_error()); Code (markup): mysql_query("UPDATE bizgame_players SET money = money - $Price where name='$_SESSION[username]' and pass='$_SESSION[password]'") or die(mysql_error()); Code (markup): $Price = $row['price']; Code (markup): It does not add or subtract the variable from the MYSQL user. How can I fix this? Please help! Thanks in advance
call mysql_error() after the mysql_query and see what it returns? you might need to pass a connection variable to both mysql_query and mysql_error to get the latter to work properly..
mysql_query("UPDATE bizgame_players SET money = money + '$Price' WHERE id='$PlayerID'") or die(mysql_error()); Code (markup): mysql_query("UPDATE bizgame_players SET money = money - '$Price' WHERE name='$_SESSION[username]' and pass='$_SESSION[password]'") or die(mysql_error()); Code (markup):