TEXTAREA and PRINT function
Posted by: administrator (199.243.180.---)
Date: April 28, 2006 06:24PM

I created a sample form.htm with TEXTAREA box and passed all the data to my Test.php. It worked okay - i can see the data i put in into the screen using PRINT. Now the problem is when i use a ( ' ) hypen in my TEXTAREA box like the word : i don't know - php result shows : i don\'t know . that's with backward slash. How do i get rid off that? How do i make php shows exactly what i type in in the TEXTAREA? Please Help.

Options: ReplyQuote
Re: TEXTAREA and PRINT function
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 29, 2006 04:09AM

The php directive magic_quotes_gpc is on by default in your php.ini file, and it essentially runs the addslashes() on all GET, POST, and COOKIE data. This means certain string characters that could cause problems in your php scripts get escaped so they do not break your script, or cause security problems. This means you need to use the stripslashes() function to strip all those escape strings from your text.

print stripslashes($SomeString);

Options: ReplyQuote

Sorry, only registered users may post in this forum.