Jump to content

[SOLVED] Using PHP to echo a page which resubmits itself back to same script


Cep

Recommended Posts

Hello,

 

I am trying to upgrade my mailer script so that rather then the user having to select a table of emails from our mailing database for every 500 recipients the script will just select a single table and then loop through every 500, echo an html page containing Javascript which then resubmits the data back to the script.

 

Currently we do this,

 

Create email -> Select a mail table -> Submit form and script runs off 500 or less emails -> Press Back on browser -> Select a new table -> Submit form and script runs off another 500 or less emails.

 

What I would like to do is this,

 

Create email -> Submit form and script loops through first 500 emails and sends -> Echo's a page with a countdown timer which resubmits the data including the last row number of the table -> Script then picks up from the last row (501) and sends another 500 emails -> Echos the countdown timer again if need be and so on until the mail is finished.

 

My script will get all the way to the echo of the countdown page but when the javascript finishes, the script doesn't actually submit, or at least does not appear too. I am wondering if this is because the script that echo's the page (automailer.php) cannot be the same script the form is meant to submit too?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.