Hi,
I'm using the following code to get Email Address
stored in a table in my Database :
<?php
$db = mysql_connect("localhost","user","pass");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM sms where
email!='' ORDER BY ID DESC",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
echo("<b><font color=#6ed8ff>$myrow[email]</b>
<br>");
} while ($myrow = mysql_fetch_array($result));
}
else {
echo "Sorry, no records matching your criteria were
found!";
}
?>
But there are some records where the user has entered
something else.. not the Email Address. I would like
to list only those records out of these, who do
contain the letter "@", so that i'm sure only those
records which actually do contain an Email Adress are
listed.
Also, when sending an email, like this :
if($submit) {
$headers .= "From: Mjimm.com
<[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Reply-To: <[EMAIL PROTECTED]>\n"; //
Return path for errors
$headers .= "bcc:$b\n"; // BCCs to
mail($to,$subject,$message,$headers);
}
?>
If there are any errors in sending the mail, how can i
get those errors, or at least have the alert that an
error was there and mail could not be sent, printed on
the page?
Thanks,
T. Edison jr.
=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php