Use this:

print("Please wait for 10 seconds while we're processing your
request..."); 
flush();
sleep(10);

Should do it for you.

Read up on output buffering on PHP.Net

-----Original Message-----
From: dufronte [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 14:36
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 script....both, 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


_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs Virus Control 
Centre.

        
*********************************************************************

Notice:  This email is confidential and may contain copyright material of Ocado 
Limited (the "Company"). Opinions and views expressed in this message may not 
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all 
copies of this message. Please note that it is your responsibility to scan this 
message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*********************************************************************

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to