Jump to content

Complete all or none


squiblo

Recommended Posts

Hi guys, I'm working on a project that handles a lot of inserts into a database and uploads files to FTP. Lets say this is the order:

 

- Step 1: Insert row into database

- Step 2: Upload files to FTP

- Step 3: Email user to confirm complete

 

If the user closes the browser soon after Step 1 has complete Step 2 and 3 will not run.

 

I would prefer if all 3 steps were complete or none at all. What can I do?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/253995-complete-all-or-none/
Share on other sites

Hmmm, I'm thinking you can keep track of each step completed. Maybe insert a row into a table that keeps track everytime a user starts step 1. if he/she closes out after it, when they log back in next you can display a message like "Finish uploading files" or whatever it is you want them to do. Then take them to a page where they can do step 2. Once step 2 is completed, update same record in database saying it's completed. Same with step 3. Once all steps are completed, either make note of that in record or simply delete it.

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.