Hi,
I have a script inserting records into MySQL as it sends messages to users. The script may take several seconds or minutes depending on the number of messages being sent. I want to notify the user on the front end about the number of messages sent after every 5 seconds using JavaScript setInterval which has a POST Ajax request.
The problem am encountering is the Ajax request gets to success only after the php script has finished sending all messages and inserting the records into the database instead of giving the progress after every five minutes.
Thanks in advance for assistance.
I have a script inserting records into MySQL as it sends messages to users. The script may take several seconds or minutes depending on the number of messages being sent. I want to notify the user on the front end about the number of messages sent after every 5 seconds using JavaScript setInterval which has a POST Ajax request.
The problem am encountering is the Ajax request gets to success only after the php script has finished sending all messages and inserting the records into the database instead of giving the progress after every five minutes.
Thanks in advance for assistance.