Re: Ordinary Timer Indicator

From: Date: Thu, 01 May 2003 18:03:39 +0000
Subject: Re: Ordinary Timer Indicator
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145991@lists.php.net to get a copy of this message
On Friday 02 May 2003 02:35, Pushpinder Singh Garcha wrote: > I am trying to make a small timer status indicator. the code looks up a > file to see if the entry is correct. In order to show the user that > some processing is being, I want to show a small timer as described > below: > > Checking Passport Code . (wait 1 sec and display '.') . (wait 1 sec > and display '.') .. and so on. > > > This is the code that I came up with and something does not seem to be > working fine. All it does is to wait for some time and display the > entire line. I want it to display the text and a '.' and wait for 1 sec > and display another '.' and so on. > > <? > > echo "Checking passport code"; > > for ($i =0; $i < 4; $i++) > > { > echo " . "; > sleep(1); > } > > ?> The short answer is that you need to use flush(). The better solution is to search the archives "progress page" or "progress indicator" or "process page" or something along those lines. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Ahead warp factor one, Mr. Sulu. */

« previous php.general (#145991) next »