I have a total amount. when i sell am item i want to add that amount to my total. e.g i have 100.00, i sell a snake for 100.00 so my total should be 200.00. I have it working so it adds the 100.00 but if i want to sell two snakes it will stay at 200.00 it wont add any amount from the second snake. using this to update my database.
if(isset($_POST['go'])
{
$query = "UPDATE users SET amount=$current WHERE email = '".$_SESSION['email']."'";
}
if(isset($_POST['go']) //edit 17.06.2022
{
$current = $amount+100;
}