Log in

View Full Version : after submit textarea values replaced the quotes with \' in php



vidya_onnet
12-22-2006, 06:41 AM
hi,

can anyone help in this

i m submitting a form which contains a textarea.. when i get the posted values in php the textarea values replaced the ' with \' and also the " with \"

how do i remove this \ in the posted value..

i m sending mail after submitting the form.. in the mail also i m getting the \

can anyone help..

djr33
12-22-2006, 07:25 AM
That's a security issue, and it's good. But... yes, at times, it can cause problems.
Please post the code.
likely, stripslashes($var); will do the trick.

mwinter
12-22-2006, 12:15 PM
i m submitting a form which contains a textarea.. when i get the posted values in php the textarea values replaced the ' with \' and also the " with \"

how do i remove this \ in the posted value..

You might look into disabling "magic quotes", thereby avoiding the addition of the slashes in the first place (and receiving a slight performance increase in the process). Just be sure to escape values when you really do need to do so.

Mike