http://qs321.pair.com?node_id=665957


in reply to Application Design Issue

Create a new module with a die wrapper, that stores the last place the user was at. It doesn't matter what the mechanism is - you can add / remove file markers, or you can store the position in a database (I recommend this for sure if you may run more than one user simultaneously) - but the wrapper will allow you to exit from any point with the desired action and only have to give a simple function call myDie($user, $position, $error)

Then of course you'll have another function that you run at the start that picks up the last user position, which is then used with conditionals to skip the parts you already covered. myPosition($user) Again, the mechanism isn't important, you can swap it around later if you feel like it.