I can't figure this out - maybe I just need a fresh look at it. ALL of my SQL statements work except this one - the database is correct, the fields are correct but I get
"Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in \admin\newsupdate.php on line 73"
Like I said, all my other commands execute fine and I just copied and pasted my code and it will not process this one. Any ideas? Here's my code:
if ($action == 'add')
{
echo "
<a href='newsupdate.php'>Go Back...</a><br>
<form method='post' action='newsupdate.php?action=addprocess'>
Enter date associated with news item<br>
<b>Format 11/30/2001</b>:<br>
<input type='text' name='dte' size='8' maxlength='10'><br><br>
Enter news description:<br>
<textarea name='desc' rows='5' cols='30'></textarea><br>
<input type='submit' value='Submit'> <input type='reset' Value='Reset'>
";
}
if ($action == 'addprocess')
{
$conn = odbc_connect( 'cvcdata', 'root', '' );
$query = "INSERT INTO news (dte, desc) VALUES ('$dte', '$desc')";
odbc_exec($conn, $query);
odbc_Close($conn);
print "News item added. Click <a href='newsupdate.php'>here</a> to return.";
}
Thanks!