Reply to Need to Flush before Sleep but I'm blank.

Your name:

Reply:


Posted by Dave on 09/20/06 13:30

Hi All

I'm new to php and am converting a bunch of asp pages to php.

Current problem :

I am using a Submit button on a form to POST ( send the database variables )
to a php page that will send a personalised e-mail to each client.

On the php page,
I am looping through a database,
compiling a message ( html format ),
and mailing the message to my client.

After the mail has been sent, I need to wait for 4 seconds before continuing
with the next database record.

I am using this code after the mail has been sent :

echo "Mail Sent to : " . $row['CliName'];
ob_flush();
flush();
sleep(4);


Problem is, that nothing appears after I click on the Submit button on the
first page's form ( the first page just remains on the screen ). Once the
database has been looped, the entire (correct) output appears on my screen -
but I need to see some sort of progress as it works it's way through the
database.

Many Thanks in advance for any assistance
Regards
Dave

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация