You are here: Re: Need to Flush before Sleep but I'm blank. « PHP Programming Language « IT news, forums, messages
Re: Need to Flush before Sleep but I'm blank.

Posted by NC on 09/20/06 14:14

Dave wrote:
>
> 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.

Not the best decision architecturally (in a shared hosting environment,
this will hit the execution time limit pretty quickly; and if you
control the environment, this is something you want to do from the
command line), but let's assume you want to stick with it for the time
being...

> 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 ).

So make something appear. Say, write this before the loop:

echo "Preparing to send mail...";
ob_flush();
flush();

You should also be aware that some Web servers will ignore PHP's
flushing instructions and continue to buffer the output.

Cheers,
NC

 

Navigation:

[Reply to this 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

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