Re: PHP Mail command
| From: | Ron Piggott | Date: | Mon, 06 Jun 2005 01:28:34 +0000 |
| Subject: | Re: PHP Mail command | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39586@lists.php.net to get a copy of this message | ||
That works. Thanks
In reality the quote is coming in from a mysql database and the ones that have " already are
saved.
If my quotation is stored in a variable named $quotation is there a way of doing a search and
replace --- search for " and if it is found replace it with \" ?
Ron
----- Original Message -----
From: Joseph Crawford
To: Ron Piggott ; [PHP-DB] Mailing List
Sent: Sunday, June 05, 2005 9:50 PM
Subject: Re: [PHP-DB] PHP Mail command
try addslashes maybe ;)
On 6/5/05, Ron Piggott <ron.php@actsministries.org> wrote:
I have a mail() question. Take a look at this sample code below: Pay
attention the $message variable
<?
$to="ron.php@actsministries.org";
$subject="Test e-mail";
$headers = "From: ron.php@actsministries.org";
$message = "
But prove yourselves doesn't and not only "hears".
";
mail($to, $subject, $message, $headers);
?>
I have a mySQL database of quotations that one is randomly being e-mailed
out daily. The trouble is that some quotations have " marks in this such as
the example above. This bit of code doesn't work because the computer is
looking for a ; following the ". Elsewhere in the quotation database there
is the use of ' . Is there a way to do a search and replace for " to ' ?
The e-mails that are sent out are plain text e-mails.
I have used the
$quotation = mysql_real_escape_string($quotation);
to be able to insert quotes with ' into the mySQL table; is there a similar
way to get around this problem I am having?
Thanks :)
Ron
PS It is a really funny e-mail I just wrote and sure is computer in nature
when entire words consist of ; " ' GRIN
--
PHP Database Mailing List (http://www.php.net/ )
To unsubscribe, visit: http://www.php.net/unsub.php
--
Joseph Crawford Jr.
Codebowl Solutions
codebowl@gmail.com