I am having an error with the following code
<?php
if(!($link =odbc_pconnect("bugtracking","llemon","llemon"))){
print("error connecting to Database");
exit();
}
$b=$glick[1];
if ($hidden=="add"){
$dated=date(mdy);
$SQL_Exec_String = "Insert Into Problems (Reportedby,Date,Subject,Details,ResolvedBy,Resolution) Values ('$b','$dated','$T3','$S1','$T4','$S2')";
$cur= odbc_exec( $link, $SQL_Exec_String );
odbc_close( $link);
}
//$results = odbc_do($link,"Insert Into Problems ([Reported by],Date,Subject,Details,[Resolved By], Resolution) Values ('$b','$dated','$T3','$S1','$T4','$S2')");
//
//}
else{
$dated=date(mdy);
$results = odbc_do($link,"UPDATE Problems SET Date='$dated', Subject='$T3', Details='$S1', Resolution ='$S2' Where (ID=$test)");
header("Location: http://glickco.com/rewrite%20support/bugs.php3");
?>
the problem is with the insert query to a access database... I have many select queries working correctly, but keep getting the following error for the query...
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in C:\InetPub\wwwroot/rewrite support/update.php3 on line 11