$sql = "INSERT INTO fans_sfeerverslagen set match='$match', titel='$titel', auteur='$auteur', tekst='$tekst'"; mysql_query($sql) or die(mysql_error());
Full code of the script: http://www.fcbfans.be/new/fans/fans_sfeerverslagen.phps
This is the error I get:
You have an error in your SQL syntax near 'match='', titel='', auteur='', tekst=''' at line 1
match is a reserved word in SQL. Rename the column.
Also, the syntax for INSERT INTO is wrong.
The correct syntax is:
$sql = "INSERT INTO fans_sfeerverslagen ( match,titel,auteur,tekst) VALUES('$match','$titel''$auteur','$tekst');
Richie. geocities.com/akindele/
Sorry, but the syntax for INSERT INTO isn't wrong. It works perfectly. Thanks anyway Lars and Richie!
That is correct, it isn\'t wrong per se but IS non-standard and MySQL specific. The: INSERT INTO table( col1, col2, col3 ) VALUES( val1, val2, val3 )
is the standard (it\'s a little more involved than that, but that is \'good form\' whereas yours is not).