How to return to the previous page

It might be very simple, but I have a problem when using it onclick="javascript:history.back(-1);"

with PHP. On the first page, I get the search result and I used a post action to get the search criteria. On this page, I can view information about the search results. When I go back to the search results page for IE, I get nothing but the page shows "webpage expired".

What can I do about this problem?

Thanks in advance!

+1


a source to share


4 answers


You have to use the POST / redirect / GET pattern:



+5


a source


IE doesn't seem to re-post the form when you return to this page. Have you considered using a GET request for your search?



0


a source


The problem (maybe) is that you can use a POST request to generate search results.

Just my curiosity: which version of IE are you using ?!

0


a source


Try submitting the form to yourself (the same page) instead of another page, and then if there is an error, you don't need to "go back" because you are already there! Just print the form and fill in the values ​​that were sent along with the message that something was not confirmed on the form.

0


a source







All Articles