Re: i get this for some reason

From: Date: Sat, 24 Mar 2001 07:19:58 +0000
Subject: Re: i get this for some reason
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45415@lists.php.net to get a copy of this message
Turn off magic_quotes_gpc in your php.ini file. -Rasmus On Fri, 23 Mar 2001, adam wrote: > everytime i post text to this file, i get the characters " and ' turning up > as \" and \' > > is there anything i can add that would keep them from outputting into this? > > here is the code i use: > > <? > > if ($message) > { > /* uncomment the next two lines to strip out html from input */ > $name = strip_tags($name); > /* $message = strip_tags($message); */ > $message = ereg_replace("\r\n\r\n", "\n<P>", $message); > $date = date("l, F j Y, h:i a"); > > if ($email == "") { > $message = "<hr noshade color=white size=1 width=100%>\n > <table width=100% cellpadding=10><tr><td>\n > <font size=2 face=verdana><b>$name </b><font size=1> -- > $date</font>\n > <blockquote>\n > $message\n > </blockquote></font>\n > </td></tr></table>\n\n"; > } else { > $message = "<hr noshade color=white size=1 width=100%>\n > <table width=100% cellpadding=10><tr><td>\n > <font size=2 face=verdana><b><a href=mailto:$emailœD?½ > §r¼3É.~Y¶>$name</a> </b><font > size=1> -- $date</font>\n > <blockquote>\n > $message\n > </blockquote></font>\n > </td></tr></table>\n\n"; > } > $fp = fopen ("comment.php.comment", "a"); > fwrite ($fp, $message); > fclose ($fp); > } > @readfile("comment.php.comment"); > ?> > > > > >

« previous php.general (#45415) next »