Click to See Complete Forum and Search --> : Add Plus (+) to database field


ai3rules
07-10-2006, 05:25 PM
This is probably a silly issue but I am having trouble inserting the plus (+) sign into a database. I am doing this from a webpage textarea, almost anything else typed in there is inserted the way I typed it with expection to the plus sign.

Is there any hack of some sort, like something I can surround the plus sign with so that the insert statement knows it's something I want to be entered as text in the field?

Thanks in advance for any help.

chazzy
07-11-2006, 08:24 AM
you'll probably have to escape it on your server side language. this is a language/dbms specific issue.

ai3rules
07-11-2006, 10:14 AM
Thanks, that pointed me in the right direction and I came across URL encoding. The javascript replace method does the trick.

replace("+","%2b")

Thanks again.