hi,
I tried to sent email to friends,that email are in the database.when I run this programme, it show a err when come a invalid email. In here i tryed to remove that invalid emil and programme run continuosly but it is not working.
<?php
//get database connection*****
$message = 'aaaa'
$subject = "testing";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$i = 0;
//----connect to the database-----//
$result = mysql_query("select * from newsletter");
while ($row = mysql_fetch_array($result)) {
$srow = $row['email'] ;
if(mail ($srow,$subject,$message,$headers)){
echo "$srow";
}
else
{
mysql_query("delete from newsletter where email='$srow'");
continue;
}
}
?>