[PHP] When putting or ' in text field, \' or \ is returned

2003-06-15 Thread Ben Houlton
As the subject say, when putting  or ' in text field, \' or \ is returned.
I'm not sure why, but it only happerns when it is returned in a input -
text field box.
Could you tell me how to fix this.
Thank you.

Code Snip:

$nl = ;

$ascii = $ascii;

$text_form = ereg_replace ( ,, $ascii);

$preview = ereg_replace ( , nbsp;nbsp;nbsp;, $ascii);

$nlbr = nl2br($text_form);

$nlbr2 = nl2br($preview);

include('includes\replace.php');

printf(INPUT type=\text\ name=\msn\
value=\$nl$newline\br\n\n);

$printout = FONT color=\#00\ face=\MS Sans
Serif\$nlbr2/FONT\n\n;


Re: [PHP] When putting or ' in text field, \' or \ is returned

2003-06-15 Thread John W. Holmes
Ben Houlton wrote:

As the subject say, when putting  or ' in text field, \' or \ is returned.
I'm not sure why, but it only happerns when it is returned in a input -
text field box.
Could you tell me how to fix this.
If you have magic_quotes_gpc enabled (which it is by default), then 
quotes will be escaped in incoming GET, POST, and COOKIE data. If you 
want to get rid of the escape characters, use stripslashes() or disable 
magic_quotes_gpc.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php