Re: Form text with reserved chars

From: Date: Mon, 04 Nov 2002 22:40:22 +0000
Subject: Re: Form text with reserved chars
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16726@lists.php.net to get a copy of this message
Hi It sounds like magic_quotes_gpc is set to On in your php.ini file.. change this value to Off if you wish to handle escaping of characters yourself. Secondly, it's advisable to research nl2br() HTH Brad "News.Php.Net" <aidal@nospam.dk> wrote in message news:20021101073812.3879.qmail@pb1.pair.com... > Hi NG. > > I'm having trouble with form textareas containing " ' ". Every time I submit > a form holding this char php will insert "\" infront of it. > I'm well aware of the reason for this but I'd like to know just how to get > rid of the "\". > > I've tried using ereg_replace("'","´",$text) but the > "\" is inserted the > very second submit is invoked. > > How do I get rid of the "\" or "\'" when I want to show the text the > form > field was holding? > > Also, I'd like to know if there is a smart way of replacing "spaces" and > "new line" in the text with the html code for this. Aka to make the view > exactly as it was typed in the field. > > If anyone can help me with this it would be very much apreciated. > > Regards > ~ Aidal > >

« previous php.windows (#16726) next »