php-general | 2001032
Date: 03/24/01
- Next message: Rasmus Lerdorf: "Re: [PHP] installation problem"
- Previous message: Matt Friedman: "Re: [PHP] PHP error parsing SQL string containing assoc. array"
- Next in thread: adam: "Re: [PHP] i get this for some reason"
- Reply: adam: "Re: [PHP] i get this for some reason"
- Reply: Rasmus Lerdorf: "Re: [PHP] i get this for some reason"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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);
}
<email protected>("comment.php.comment");
?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Rasmus Lerdorf: "Re: [PHP] installation problem"
- Previous message: Matt Friedman: "Re: [PHP] PHP error parsing SQL string containing assoc. array"
- Next in thread: adam: "Re: [PHP] i get this for some reason"
- Reply: adam: "Re: [PHP] i get this for some reason"
- Reply: Rasmus Lerdorf: "Re: [PHP] i get this for some reason"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

