I am having problems running this script, but i keep on getting the same error message. Could someone point out where I am going wrong? Thanks.
Error message: 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
$datenow = date("Y-m-d") . " " . date("H:i:s");
$conn = mysql_connect('localhost', 'admin', 'root') or die(mysql_error());
mysql_select_db('main') or die(mysql_error());
$queryh = "INSERT INTO user_comments (posted_by, posted_to, comment, date_posted) ".
" VALUES ('{$postman}', '{$id}', '{$comment}', '{$datenow}' ";
$result = mysql_query($queryh) or die(mysql_error());
echo "posted";