I have a page with a form on it. The form submits to the same page and there are PHP functions to validate the fields.
If PHP detects any errors with the fields, then the application process goes no further and a message is displayed to the user to correct their errors.
If there are no errors detected however, PHP then posts the details to an external website who give us a response via XML. Our page then receives the response and handles it accordingly, such as redirect the user or asking them to correct further errors.
At the moment everything is done via just the 1 application page. However, the response from the external website can take around 30 to 60 seconds, so we want this function to be contained in a separate page, and then have an ajax spinning progress indicator on the actual application page whilst we are waiting for a response so that the visitor does not navigate away or try and refresh the page.
All the functions are there and working, it's just a matter of breaking it into 2 pages and adding the progress indicator. The indicator doesn't have to be a percentage or anything, just simply a spinning gif.