I have a simple mail form in which I type the following into the mail message:
The "Iron Men" like Harry's dog.
I retrieve the message body with the following statement:
$Body = $_POST[ "frmBody" ];
When I display $Body, I obtain:
The \"Iron Men\" like Harry''s dog.
How can I eliminate the back slashes before the double quote and apostrophe characters? They appear to be inserted by the PHP form parameter parser. I am using PHP Version 4.3.1.
Special Characters in HTML Forms
Moderator: General Moderators
Code: Select all
stripslashes($Body);stripslashes()
Thanks Wayne. The stripslashes() function did exactlye what I wanted. This is the first time I've ever used PHP so I have a lot to learn.
i suggest getting a php book if you're new. it'll help you learn and you wont need to wait. also try http://www.php.net
they have all the functions etc on there
they have all the functions etc on there