squiblo Posted December 29, 2011 Share Posted December 29, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/253995-complete-all-or-none/ Share on other sites More sharing options...
jamesjmann Posted December 29, 2011 Share Posted December 29, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/253995-complete-all-or-none/#findComment-1302058 Share on other sites More sharing options...
squiblo Posted January 9, 2012 Author Share Posted January 9, 2012 Thanks for the input jamesjann, any more suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/253995-complete-all-or-none/#findComment-1305880 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.