Results 1 to 2 of 2
Jan 10, 2001, 16:10 #1
- Join Date
- May 2000
- Salt Lake City, UT
- 0 Post(s)
- 0 Thread(s)
I've been working on a message board for my company. Many things are going ok, but I've been getting this error when someone enters text in a textbox and uses apostrophes in their text (such as don't won't can't). It works fine without the apostrophes. I checked my php.ini and have magic_quotes_gpc to on and I've tried the addslashes() function, but I still get the error.
This is the error:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''This test doesn\'t' WHERE [ID] = 33'., SQL state 37000 in SQLExecDirect in C:\Inetpub\wwwroot\edit.php on line 36
Here is my script:
$joketextedt = addslashes($joketextedt);
$sql = "UPDATE Jokes SET JokeText = '$joketextedt' WHERE [ID] = $editjoke2";
$editJoke = odbc_do($dbcnx,$sql);
I'm using a MS-access 2k database with php4. Any sudgestions??Joe Eliason
Just a dog learnin' PHP from cat.