I am writing php to update a user's balance, but my UPDATE query seems to be throwing an error when it is executed.
$student = $database->quote($_POST ["studentID"]);
$amount = $database->quote($_POST ["update_balance"]);
//sets query to update user balance
$query = "UPDATE `User` SET `balance`= (`.$amount.`) WHERE `userID`= (`.$student.`)";
//excecutes the query
$database->exec($query);
The 'studentID' and 'update_balance' are names of input fields being captured in the HTML.