Ajax PHP MySQL based progress bar

In applications where the main script takes time to execute the full code, we can have some break ups or some landmark points at some intervals. Once the execution completes these landmarks then it will update a table with status indicating the completion of the part. Our progress monitoring script will interact with this table to take the feedback and display the progress bar accordingly. 

Here is the block diagram of the process. 


There is not much difference in basic progress bar script and this.


This page reads the data from the status table and returns the same to progress-bar2.htm through Ajax to display the progress bar image.


This script first deletes all the records of the status table and then updates it with different stage values. To create some delays in script execution sleep() function is used. At the end of each stage the status table is updated. 
Directions: Simply download, which contains all the files