我有这样一种处理过期会话的机制:
User logged in
Session expires
User goes to link
User redirected to login page
User logs in
User redirected to requested link
我想要实现的是与表单具有相同的功能,例如:
User logged in
User starts to fill out a form
Session expires
User submits a form
User redirected to login page
User logs in
Form posted on behalf of user (aka redirect with post)
但截至目前,它的工作原理是这样的:
User logged in
User starts to fill out a form
Session expires
User submits a form
User redirected to login page
User logs in
User redirected to form page with all fields empty
User sad
我尝试使用 http_redirect 来实现它,但事实证明它只是将参数添加到 URL。问题是,服务器端不接受 GET,只接受 POST。我一直在尝试其他方法来做到这一点,比如自动保存功能、javascript 发布和重定向等。
一定有人以前遇到过这个问题。
有任何想法吗?