July 31st, 2000, 06:21 PM
Hi I have the following table (real simple):
CREATE TABLE txttest (comments TEXT);
I then use a <textarea> to enter text.
This text then gets inserted into the table above.
I was told to use: $comments=urlencode($comments);
before inserting into my database
This WORKS when I type in something like:
"this is a comment line" (looks like: this+is+a+comment+line)
if I type in something like:
"this is a comment line,
this is another comment line"
(looks like: this+is+a+comment+line%2C%0D%0Athis+is+another+comment+line)
I get this error:
Error in executing INSERT INTO txttest (comments)VALUES('this+is+a+comment+line%2C%0D%0Athis+is+another+comment+line')
error:1065 Query was empty
July 31st, 2000, 10:32 PM
escape from special character using ''(ie,"I'm shiju").if you are using mysql with php then you may try addslashes() php function to escape from special characters.
"The fear of the LORD is the beginning of knowledge..."