i get this for some reason
| From: | adam | Date: | Sat, 24 Mar 2001 06:49:25 +0000 |
| Subject: | i get this for some reason | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45411@lists.php.net to get a copy of this message | ||
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");
?>