1: unreliable way?
i have written php scripts that have a very large output result (like 500K log files or something). in these cases, the page begins to show before the script has finished running. I don't think this would be a reliable thing to do, but you might display the 'please wait message' without a closing </body> or </html> tag and then when your script completes then send a META tag to redirect the page. i don't recall the exact meta tag...it's used by the phpbuilder site after you complete a post...try viewing source after you post this page (very quickly!) and you'll probably see it.
2: unreliable way part 2?
Another way would be with a frame or iframe. you could display your 'please wait' message in a document that contained a frame. in that frame, you could display the script which acutally does the processing. the frame would be blank until the processing finishes at which point it would either display the meta tag above or display some javascript that would redirect the browser. i'm not at all sure that a META tag could redirect your top-level browser frame to redirect. also, not every browser has javascript.
maybe someone else can suggest something?