错误 - 网页已过期PHP? [英] Error - Web Page Has Expired in PHP?

查看:142
本文介绍了错误 - 网页已过期PHP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有六页在我的PHP项目登记表。

I have six pages for a registration form in my PHP project.

在,如果我preSS从浏览器栏的后退按钮的页面之间我得到的错误:

In between any of the page if I press the back button from the explorer bar I get the error:

网页已过期

我使用 $ _ POST 来提交数据。我不明白,为什么出现这种情况?

I am using $_POST to submit the data. I can't understand why this occurs?

推荐答案

这消息有与IE浏览器处理来自POST数据生成的页面的方式做。

That message has to do with the way IE handles pages generated from POST data.

在一般情况下,为了避免这个问题必须确保在后面历史,用户将永远无法降落被从POST请求而生成的网页上。由于 jspcal 建议,你的帖子的反应应该是一个重定向到一个GET请求另一页。这也被认为是最佳实践,因为它减少提交表单两次的风险。

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.

这篇关于错误 - 网页已过期PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆