The only way to do it with PHP alone would be to control the output
buffering and I've found that to be inconsistant in quality and
predictability with different browsers even web servers. I'm sure
there's an art to getting that all working well with various technologies
that are involved in the script -> client caching and processing, but why
mess with iffy when you can use a proven technology like AJAX.
Get familiar with jQuery (or one of the other big JS libraries, but jQuery
is my choice hands-down) and you'll probably find it's pretty easy.
----- Original Message -----
From: "Ashley M. Kirchner" <ash...@pcraft.com>
Date: Mon, 5 Apr 2010 20:12:30 -0600
Subject: [PHP] Updating HTML on page
> I have a PHP script that queries a DB to get a list of image names. Then
> processes each name and generate thumbnails and what not. What I want to
> is have a page called (through the browser) which updates as the PHP
> in the background is working. So when you first pull up the page it will
> say 'There are x images to process' and then dynamically update the page
> with a progress status. In its crudest form it should say something like
> 'Processing 1 of 5 images .' When that image is done, it should update
> page with 2 of 5 . etc., etc. Ideally without refreshing the page each
> Is this where I need to figure out Ajax and incorporate it with PHP?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php