i have a script that will send out invitations to people using phpmailer. the problem is that that nothing is displayed to the user until after the mails get sent out (which is a long time). my code is as follows:
1. users fills out form
2. form submits to php_self and then it adds the email addresses to the database
3. once all emails are added to the database the code submits a hidden form with certain variables to go to a mail sender page (mailsender.php) which will actually send out the mails. it sends in groups of 25 emails, when it reaches 25 sent if submits a hidden form to the same page to continue sending the others out. basically is a loop getting remaining emails to send and submitting the hidden form over and over until all emails are sent.
again, the problem is on the second page (mailsender.php) the header include, footer include, as well as email sending status dont get displayed until the loop happens and all emails are sent out. im thinking maybe something with output buffering will help?
i want it to i guess display the results of the previous sending of the emails while its sending out the current group of emails.
Can someone please have a look at the code and see where it can be tweaked?
HERE ARE THE LINKS TO THE FILES: click here to down .zip (only 3 files) *
YOUR HELP IS MUCH APPRICIATED!!