Allora ragazzi ho questo codice:
include("config_sito.php");
$connessione = mysql_connect($host, $user, $password);
mysql_select_db($db) or die("Selezione database non riuscita");
mysql_query("SET NAMES 'utf8'");
$query = "INSERT INTO portale_comment (`contentid`, `ip`, `date`, `name`, `email`, `website`, `title`, `comment`) VALUES ('$id', '$ip', '$data', '$nome', '$email', '$sito', '$titolo', '$commento'";
$risultato=mysql_query($query);
if (!$risultato) {
die('Invalid query: ' . mysql_error());}
echo'Commento Inserito Correttamente!';
Il problema è che quando provo ad inviare il form ricevo il seguente errore:
Invalid query: 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 '' at line 1
Mi date una mano a trovare l' errore??