[eluser]Kromack[/eluser]
So,
I think it should gone like this :
When the user have completed one step, you put all data in your table with :
- The session id
- The id of the step
- All datas
- the current timestamp (see the time() function or the date helper)
Then, when a step is validate, you have to check if the user have completed all precedent steps (use the the session id to find your user).
By using this method, if the session of an user expire, the session id will mismatch. So he have to redo all steps.
The next problem is to purge your table (in fact to remove all row with a session id expired).
You can create in your controller a function :
Code:
public function purge() {
//Get current timestamp
//Calculate the timestamp offset (now - X seconds)
//foreach row
////calculate the offset of the row (stored timestamp + x seconds)
////if((stored timestamp + x seconds) <= (now - X seconds))
////then delete the row
////endif
//endforeach
}
Ok, in France it is the morning, so I'm a little like this : :long:
If you have any problem, you can ask
Good luck