I'm new at coding and I'm trying to learn PHP and other languages all by my self. But I'm having an issue in my code, the code that I wrote to change values on a database isn't working at all. Do you guys have any idea?
if(spin($color)){
$wonlast = true;
$moneypot += $current_bet;
$result_text .= "Winner!<br/>";
mysqli_query($con, "UPDATE store_players SET `credits` = $moneypot WHERE `id` = 1");
}else{
$result_text.= "Loser<br/>";
$wonlast = false;
$moneypot -= $current_bet;
mysqli_query($con, "UPDATE store_players SET `credits` = $moneypot WHERE `id` = 1");
}