$query = "UPDATE news SET text =". nl2br($_POST['text']).", author =". $_POST['author'] .", email =". $_POST['email'] .", title =".$_POST['title']." WHERE ID = " . $_GET ['id'].";";
$result = mysql_query($query,$db) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " .
mysql_error());
gives
A fatal MySQL error occured.
Query:
Error: (1064) 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