I use this way to insert data all the time, now all of a sudden only on this script do I get this error.
<--here is the error-->
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 'desc), VALUES ('sdothard', 'Smoking is healthy', '2008/21/05', '5:00', 'Teach yo' at line 1
<---this is the code-->
if (isset($_POST['MM_insert']) && $_POST['MM_insert'] == "form1")
{
$insertSQL = "INSERT INTO training (name, class, date, time, desc) VALUES ('$name', '$class', '$nd', '$time', '$desc')";
$insert = mysql_query($insertSQL, $user_login) or die(mysql_error());
}
Any thoughts on why this won't work?
<--here is the error-->
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 'desc), VALUES ('sdothard', 'Smoking is healthy', '2008/21/05', '5:00', 'Teach yo' at line 1
<---this is the code-->
if (isset($_POST['MM_insert']) && $_POST['MM_insert'] == "form1")
{
$insertSQL = "INSERT INTO training (name, class, date, time, desc) VALUES ('$name', '$class', '$nd', '$time', '$desc')";
$insert = mysql_query($insertSQL, $user_login) or die(mysql_error());
}
Any thoughts on why this won't work?