hello everybody,
i am looping through my db, and pulling a 3 values per entry and then sending them a dynamic email.
My problem is that I want to monitor this email by emai...line by line....however the way it is now, it either times out or or it displays all output at the end of the script....
should i change this to a foreach loop?
$query = mysql_query("SELECT * from test");
$from = "help@subject.com";
$subject = "subject";
$body = "$fname $lname,\n
Your bib number is $bib\n";
stripslashes($body);
strip_tags($body);
stripslashes($subject);
strip_tags($subject);
stripslashes($mailheaders);
strip_tags($mailheaders);
while ($row = mysql_fetch_array($query))
{
$email = $row['email'];
$fname = $row['fname'];
$lname = $row['lname'];
$bib = $row['bib'];
mail($email, $subject, $body, $mailheaders);
echo "sending to ".$email."\n";
sleep(5);
ini_set('max_execution_time', '1000');
set_time_limit (1000);
}
thanks!
-Michael