Forum Moderators: coopster
I'm getting visitors to complete quite a long list of quiz questions, and often they drop out half way through.
Can anyone recommend a way to get them to 'save' the point (perhaps in a seperate mysql table) and return to that same point when they come back?
This will stop me from losing data when they close the browser, and stop them from having to repeat themselves from the start.
Any suggestions would be most helpful.
Thanks in advance,
Each page they progress through checks the validity of the information, then updates their record in your table. By default set a field called "finished" to "no". Only when they're done will you change that field to "yes".
When they come back you identify them by cookie or email address or whatever personally identifiable piece of information you're using. Then check the "finished" field. If it's "no" you then check which fields have not been updated yet (still NULL) and send them to the proper page.
When they start, create a new record in your table and insert that bit of personally identifiable information into a cell, as well as "no" into the "finished" cell.
Then when they fill in their first name / last name on the next page, just update that record by adding those bits of information.
Then on the next page the city / state / zip, just update those fields in the same record in the same table.
They only ever have a single record in a single table, you just update a few fields at a time.
[added]
When you're determining which page they should go back to, you can either do several checks to see which fields in their record are still NULL or you could make a separate field "page" that gets updated each time they progress to a new page.
When they start, "page" is set to 1. When they go to the next page and it updates the record with their first name / last name, "page" gets set to 2. Etc.
Then when they return you just check the page number and send them to that one.