In the following code:
<?
$sql2 = "select email from mail";
$res2 = mysql_query($sql2) or die("Couldn't get addresses.");
$headers = "From: \"".FROMNAME."\" <".FROMEMAIL.">\n";
while ($row = mysql_fetch_array($res2)) {
$email_addr = $row[0];
if (INSERTLINK == "true") {
$fullmessage = $_POST[message] . "
-------------------------------------------------------
Unsubscribe Below
:: " . BASEHREF . "unsubscribe.php?email=" . $email_addr . "
-------------------------------------------------------";
} else {
$fullmessage = $_POST[message];
}
mail("$email_addr", "$_POST[subject]", $fullmessage, $headers);
}
echo "E-mail sent!<br><br><a href='/admin'>Return to Admin Home</a>";
?>
I have a form that posts to this PHP file that in turn sends a newsletter. The problem is that the "message" which is the body of the email has backslahes in it like so:
It\'s a bad idea to go there. (backslash before the ')
I can't figure out how to remove the backslashes!
I've tried the stripbackslashes command, but that does nothing.
thanks!