I'm new to php and I'm trying to make a coin toss game that ads or minus's points from the users money...
$comp_guess = rand(1,2);
if($your_guess == $comp_guess) {
$Query = ("UPDATE $TableName SET money='money + 500' WHERE name='Ace'");
$Result = mysql_db_query ($DBName, $money, $Link);
echo "You Win!";
}
if($your_guess != $comp_guess) {
$Query = ("UPDATE $TableName SET money='money' - 500 WHERE name='Ace'");
$Result = mysql_db_query ($DBName, $Query, $Link);
echo "You Lost!";
}
?>
On the UPDATE $TableName, how do I make the user's money increase by 500? thx