I have six pages for a registration form in my PHP project.
In between any of the page if I press the back button from the explorer bar I get the error:
Webpage has Expired
I am using $_POST to submit the data. I can't understand why this occurs?
That message has to do with the way IE handles pages generated from POST data.
In general, to avoid this problem you have to make sure that in the back history, the user will never be able to land on a page that was generated from a POST request. As jspcal suggested, your POST response should be a redirect to another page requested by a GET. This is also considered best-practice since it reduces the risk of submitting a form twice.
redirect the page after receiving the post:
$name = $_POST['name'];
...
header('Location: next.php');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With