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 'WHERE post_date = "20021018222436"' at line 5
^ The above is the error that I keep getting here is my code.
$subject=$HTTP_POST_VARS["subject"];
$body=$HTTP_POST_VARS["body"];
$post_date=$HTTP_POST_VARS["post_date"];
$db_name = "diablo";
$table_name = "news";
$connection = mysql_connect("65.26.138.33", "username", "password") or die(mysql_error());
$db = mysql_select_db($db_name, $connection) or die(mysql_error());
$sql= "UPDATE $table_name
SET
subject = \"$subject\",
body = \"$body\",
WHERE post_date = \"$post_date\"
";
$result = mysql_query($sql, $connection) or die(mysql_error());