I’ve been working on some areas of PHP that I’m not quite as familiar with lately, getting ready to take the Zend PHP 5 certification exam.
Today I played around a little with sessions. I was able to use them to avoid the annoying browser history “this page was generated from POST data, do you want to resend the POST data?” problem when you go back to a page where login information had been authenticated.
The trick? I use header("Location: /path/to/logged-in-home.php"); after successful authentication, but otherwise display a page with error messages. It’s a small problem, but it’s nice to do away with it.