Salve a tutti
sto facendo un piccolo script di esempio per imparare ad inserire dei dati nel database mysql questo è lo script:
Codice PHP:
$nome= trim($_POST["nome"]);
$cognome= trim($_POST["cognome"]);
$email= trim($_POST["email"]);
$testo= trim($_POST["testo"]);
mysql_select_db("messaggi",$db);
mysql_query("Insert Into messaggi (Nome, Cognome, Email, Testo) valuse (".$nome.", ".$cognome.", ".$email.", ".$testo.")",$db);
mi dà questo errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@live.it, Prova messaggio)' at line 1