Anyone? more info...
| From: | Shawn McKenzie | Date: | Mon, 10 Feb 2003 23:53:28 +0000 |
| Subject: | Anyone? more info... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135139@lists.php.net to get a copy of this message | ||
Is more info needed, or was everyone just going post replies like:
"see stripslashes() and htmlentities()"
*******************************************************
I have a form and I want the user to be able to enter html in a text area.
This will then be stored in an array in a config file. Example
$htmlstuff[1] = '<script type="text/javascript>some stuff here</script>';
When they visit the form again it will display as they entered it and they
can modify it and save it back to the array. The problem is I keep getting
multiple \ on the single and double quotes every time they submit the form,
as well as multiple newlines and trailing spaces.
I have looked at and tried combinations of stripslashes(),
htmlspecialchars() and htmlentities(), so I don't need a link to the PHP
manual. I can't find the right combination and don't know when to do what
to get this to work. Can anyone give me a good example?
Serious help appreciated...
Thanks!
-Shawn