简体   繁体   中英

Display previous page results when we click back button in browsers

我有一个使用PHP的应用程序,它是一个搜索表单。如果我在搜索框中进行搜索并提交表单,那么将显示产品列表,如果我单击任何产品,它将转到产品页面,现在是什么我的问题是,当我在浏览器中单击“后退”选项时,重新提交的警报仍然出现。我去了上一页搜索结果,但未显示,它也重定向到了首页而不是搜索表单。

   Since i have list of variables i am using POST method instead of GET method.But if i use GET method there is no issue but i want to know whether the same can be in POST method also.

Use GET. There's a lot of debate about what qualifies for each of the HTTP verbs, but generally speaking this fits squarely in the GET world. The POST warning by the browser is unwarranted: the first sign that you shouldn't be using it for this particular operation (search).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM