When a user fills in a form, then clicks on submit I'd like to show a page that says something like "searching for your stuf..." while the processing is going on, and then when the processing is completed a page with the results is displayed. Kinda like what Orbitz or Expedia does when you're searching for a hotel or flight. How could something like this be done in php?
Do you actually want it searching for information while that page is shown? Some sites have such a large amount of data they need extra time, while others do it purely for visual effect. If you're going for the effect, pass the variables to a second page with all the variables in hidden fields in a form (along with your "processing" message and animated GIF). Then, use Javascript to submit the form after 5 seconds or so.
I think that for most real queries you wouldnt need to have a searching page, as it's likely to be done in < .5 seconds.