Over on PHPBuilder.com this morning, there's a new piece that will step you through manually expiring pages so that your users can't get back to them to rerun code.
After going through a series of pages during a registration process, you don't want the user to be able to go back after the final submit. What can you do to manually "expire" those pages, and perhaps display a custom message? In this scenario, I didn't want my session to expire as I needed it to continue. Instead, I used an extra session variable to track whether my session was alive or not. There are three main components: (1) the entry script, (2) the Cache-control directive, (3) the conditional check, and (4) manually expiring a portion of the session.
They show you how to use these session variables to create something you can manually expire, and redirect the user to an error page instead of the real previous page. This can be a great benefit, especially for forms that you want submitted only once - like a user registration or a payment on a online payment center.




