I am trying to send email to a large list of contacts and i want to be able to measure the degree of sending i.e that is display a loading bar that shows the percentage of sending while email is being sent. below is the html
<div id="loading" style="height:20px;"></div>
Then the Javascript code
$.ajax({
type: "POST",
url: "engine/send-mail.php",
data: "action=sendmail",
success: function (Databack) {
$('#loading').css('width', Databack);
}
});
note the php server side code
$query = "SELECT email FROM clientsdata";
while ($data = mysql_fetch_array($query)) {
extract($data);
mail_user($email, $subject, $message);
$no++;
echo $no."px;";
}
more like a progress bar but it dont work.