
zizu
New User
Nov 5, 2008, 7:29 AM
Post #1 of 2
(200 views)
|
|
problem escaping a special character
|
Can't Post
|
|
Hello, I have an input box and if I insert for example the word o'clock in the input box and I1 click on a button, the word o'clock is stored in a variable $time. Now i do an sql to update my database as follows: UPDATE Persons SET name='$time', WHERE id=1 In my database the word is not inserted because of the special character single quote in the word ('). Can anyone please tell me how to escape the single quote in the word o'clock stored in the variable $time
(This post was edited by zizu on Nov 5, 2008, 7:53 AM)
|