I have 22 text areas on a web page with the action going to a php script that writes whaever is in the text areas to a web pag.it simply opens files and writes to them, they are html files. the problem i’m having is the scriipt is putting a back slash before double and single quotes. does anybody have an idea why this is happening? There are no rejplace functions in the script. any help would be greatly appreciated.
How about something like this:
$yourcontent = stripslashes($_POST[‘yourcontent’]);
What you’re seeing is magic quotes. It’s annoying, and encourages bad coding habits. You can disable this behavior by adding the following line to .htaccess at the root of your site:
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
Note that PHP must be running as an Apache module, not CGI, for this to work.
If you want useful replies, ask smart questions.
Thank you both, I was going to ask for an explanation. That’s interesting