Basically what I am trying to do is display a "please wait" while a process that can take from 3 - 300 seconds takes place. I can't quite figure out the logic to make it happen.
Step 1 - The Form:
PHP Code:
<form name="StartForm" method="post" action="check.php">
Please enter your number (no dashes):<input type="text" size=10 maxlength=10 name="tn">
<input type="submit" name="submit" value="Submit">
</form>
Step 2 - Please wait:
PHP Code:
include ("func.php"); // LotsOfTime is in here
// I need this to be ran only ONCE in the background
$result = LotsOfTime(); // this can take from 3 to 300 seconds
// the flaw is here because it won't go on until it has taken place.
print "Please wait!";
while ($result == 0){
// status bar.....
print " . ";
}
// after $result has a value I then want to refresh to a new page, I can pass it in a cookie easy enough
Step 3 - Results page:
PHP Code:
// I can grab this out of the session cookie simply
print $result;
I need this to work well in IE and Mozilla. I have a current implementation, but because the page is in tables IE won't render it until it has received the complete contents of the page.
I'm just kinda lost, not sure how the best way to make this happen is.
Thanks
WSU
|