I have this code:
$sql = "UPDATE prodotti SET Descrizione = $descrizione, Prezzo = $prezzo, Quantita = $quantita WHERE Nome = $nome;";
if($connessione->query($sql)){
echo "Successful Update";
}else{
echo $connessione->error_log;
}
The browser gives this error:
Fatal error: Uncaught mysqli_sql_exception: Unknown column 'ciccio' in 'where clause' in C:\xampp\htdocs\InserimentoProdotti\php\modifica.php:15 Stack trace: #0 C:\xampp\htdocs\InserimentoProdotti\php\modifica.php(15): mysqli->query('UPDATE prodotti...') #1 {main} thrown in C:\xampp\htdocs\InserimentoProdotti\php\modifica.php on line 15.
In this moment, my database is like this: Columns: ID, Name, Description, Price, Quantity. (My db is in italian, so I translated).
I need to change all those data a selected record,the user can select a specific product using a select tag in the form.