I have the following simplified while loop code:
while($row = mysql_fetch_array($result)) {
mail($to, $subject, $newMessage, $headers);
}
Is it possible to display a text while the loop goes on, such as "Sending email 1 from 100", then "Sending email 2 from 100", etc...? When the while loop finishes, clear the text and show for example, "All mail was sent!".
I don't know how to explain it better, what I can easily do is print that text every time we enter the loop, but then the page ends up with 100 texts printed.
I'd like something like a floating div that updates while in the loop, then dissapears.
Hope I have made myself more or less clear!
Thankss!