Could anyone please help me on this while loop?
I had this script from somewhere, It send email to ALL the Contact in the list.
$sql2 = "select Email from Mail order by Name";
$res2 = mysql_query($sql2) or die("Couldn't get addresses.");
$headers ="From: Account Department";
while ($row = mysql_fetch_array($res2)) {
$email_addr = $row[0];
$fullmessage = $_POST[message] ;
mail("$email_addr", "$_POST[subject]", $fullmessage, $headers);
}
echo "email sent!";
But, could anyone please teach me on HOW to limit it ONLY send email to 50 person on the list.
Thanks for who every going to teach me.
Welson