Ciao,
Stò facendo qualche modifica su un sito che stò sviluppando, nel cambiare alcuni attributi html mi sa che ho toccato il php, il problema è che non trovo alcun errore di codice, eppure ora l'inserimento news non funziona più e restituisce l'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 ' , , ``, ``)' at line 1
il codice della pagina è il seguente:
Quale può essere l'errore???Codice PHP:
<?php
//host
$db_server = "******";
//username
$db_username = "******";
//password
$db_password = "******";
//connessione al db
mysql_connect($db_server, $db_username, $db_password) or die ("No Server Connection");
//selezione db
mysql_select_db("db_butterfly") or die ("No DB Connection");
$insert = "INSERT INTO `tab_news`(year, month, day, news, author) VALUES($year, $month, $day, `$news`, `$author`)";
mysql_query($insert) or die(mysql_error());
?>![]()
Grazie mille
[TrGh]