Or, to strip slashes off a specific variable (set_magic_quotes will affect all variables) try:
$text = stripslashes($text); -Dash -----Original Message----- From: Miha Nedok [mailto:mike@;voyager.unix-systems.net] Sent: Friday, November 01, 2002 5:00 AM To: news.php.net Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Form text with reserved chars Try set_magic_quotes_runtime(0) to get rid off \ . Cheers On Fri, 1 Nov 2002, news.php.net wrote: > Date: Fri, 1 Nov 2002 08:37:50 +0100 > From: news.php.net <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Form text with reserved chars > > Hi NG. > > I'm having trouble with form textareas containing " ' ". Every time I sub= mit > 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 ge= t > rid of the "\". > > I've tried using ereg_replace("'","=B4",$text) but the "\" is inserted th= e > 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 > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php