RE: [PHP-DB] Delay Confirmation....
javascript seems to be a more likely candidate for this. The function you'd use is: -Original Message- From: dufronte [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 7:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Delay Confirmation Hi, I'm still new in PHP..., I have some problem in using sleep() function. Actually, I want to make a script that confirm the user to wait for 10 seconds before proceed to the next step. First the message Please wait for 10 seconds while we're processing your request... will be shown to user, then at the same time I want to delay the processing for 10 seconds with sleep() function. This is my script : ?php $i=0; set_time_limit(10); print(Please wait for 10 seconds while we're processing your request...); sleep(10); $query=insert into..; etc. ? But the result juz not like I wanted. The sleep runs before the message shown up..., not before the query... I think, sleep() is delayed a whole scriptboth, the message and the query result are printed out after 10 seconds... It makes me so confused How could I fix it ??? Please help me... --www.kapsul.org-- DuFronte -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Delay Confirmation....
Anyone know how to disable CTRL-ENTER in outlook? Anyway... the what I was saying: function wait10SecondsAndThenGoToADifferentPage(){ setTimeout(window.location.href = 'pageYouWantThemOnWhenDone.php';,1); } Ryan -Original Message- From: Ryan Jameson (USA) Sent: Monday, December 09, 2002 7:38 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Delay Confirmation javascript seems to be a more likely candidate for this. The function you'd use is: -Original Message- From: dufronte [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 7:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Delay Confirmation Hi, I'm still new in PHP..., I have some problem in using sleep() function. Actually, I want to make a script that confirm the user to wait for 10 seconds before proceed to the next step. First the message Please wait for 10 seconds while we're processing your request... will be shown to user, then at the same time I want to delay the processing for 10 seconds with sleep() function. This is my script : ?php $i=0; set_time_limit(10); print(Please wait for 10 seconds while we're processing your request...); sleep(10); $query=insert into..; etc. ? But the result juz not like I wanted. The sleep runs before the message shown up..., not before the query... I think, sleep() is delayed a whole scriptboth, the message and the query result are printed out after 10 seconds... It makes me so confused How could I fix it ??? Please help me... --www.kapsul.org-- DuFronte -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Delay Confirmation....
Thanks for the Javascript... but my real case is in PHP not Javascript... :D I've tried with javascript, it worked, but not with PHP... I've tried what Michael Hazelden said. print(Please wait for 10 seconds while we're processing your request...); flush(); sleep(10); But it didn't work... it gave me the same result like before Or maybe there's something wrong with my browser ??? I'm using Internet Explorer :D But I think it's not the cause.. --www.kapsul.org-- DuFronte -Original Message- From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:40 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Delay Confirmation Anyone know how to disable CTRL-ENTER in outlook? Anyway... the what I was saying: function wait10SecondsAndThenGoToADifferentPage(){ setTimeout(window.location.href = 'pageYouWantThemOnWhenDone.php';,1); } Ryan -Original Message- From: Ryan Jameson (USA) Sent: Monday, December 09, 2002 7:38 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Delay Confirmation javascript seems to be a more likely candidate for this. The function you'd use is: -Original Message- From: dufronte [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 7:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Delay Confirmation Hi, I'm still new in PHP..., I have some problem in using sleep() function. Actually, I want to make a script that confirm the user to wait for 10 seconds before proceed to the next step. First the message Please wait for 10 seconds while we're processing your request... will be shown to user, then at the same time I want to delay the processing for 10 seconds with sleep() function. This is my script : ?php $i=0; set_time_limit(10); print(Please wait for 10 seconds while we're processing your request...); sleep(10); $query=insert into..; etc. ? But the result juz not like I wanted. The sleep runs before the message shown up..., not before the query... I think, sleep() is delayed a whole scriptboth, the message and the query result are printed out after 10 seconds... It makes me so confused How could I fix it ??? Please help me... --www.kapsul.org-- DuFronte -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Delay Confirmation....
on 12/9/02 9:35 AM, dufronte at [EMAIL PROTECTED] appended the following bits to my mbox: Actually, I want to make a script that confirm the user to wait for 10 seconds before proceed to the next step. First the message Please wait for 10 seconds while we're processing your request... will be shown to user, then at the same time I want to delay the processing for 10 seconds with sleep() function. ?php $i=0; set_time_limit(10); print(Please wait for 10 seconds while we're processing your request...); sleep(10); $query=insert into..; .etc. ? How could I fix it ??? Please help me... The flush() option recommended by some is not compatible with all user agents. Another way to do what you want is to have a separate page before the processing page. Basically, have a page that says: Please wait for 10 seconds while processing your request... With either a meta refresh header or JavaScript, or just a link to the processing script. The processing script would contain: sleep(10); Do query The browser will continue to show your processing request page while waiting for the processing finished page to show up, which will take at least 10 seconds because of the sleep(10) command. Why do you want to sleep instead of giving the results to the user as soon as they are ready? Is it a security issue so the server doesn't get flooded with automated requests? Sincerely, Paul Burney -- I'm inhaling Caesar's last gasp... http://paul.burney.ws/thoughts/caesars_breath.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php