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>$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");
> ?>
>
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to