Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

How get progress from Codeigniter inserting data into MySQL via Ajax

$
0
0
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.

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>