Reputation: 7277
I have two PHP pages...page A and page B. Page A is basically a form that takes input values from a user and posts them to page B which runs a python script to do some calculations over the submitted values and presents the calculated values on page B. I want to include a page C in between A and B which displays a loading bar or icon meanwhile the page B's content is prepared to be displayed, and then directs user to the page B. Is there a pure PHP or PHP+JS+CSS way of doing this?
The idea is to capture the status of page B and the user is only directed to Page B from Page C when Page B's content is ready to be displayed.
Upvotes: 2
Views: 448
Reputation: 46259
There are two possible ways to do something like this.
Both begin with AJAX; when you submit A.php it should send an AJAX request instead of loading B.php directly. A then has a chance to act on the response as it happens.
For communicating progress, here are your options:
Upvotes: 1