dongpu1908
2015-06-04 17:43
浏览 150

隐藏确认表单重新提交PHP

After I submit a form, and I click the back button, the page displays the confirm form resubmission page. Instead of that, I actually just want the browser to display the form itself. It there a way to do that? Here is a part of my code below, and it works except that it will not stop refreshing. I just want it to refresh once when you click the back button.

<meta http-equiv="refresh" content="0">
<form method = 'post' action = 'submitPost.php?section=$section'>
<textarea rows='10' cols='100' name = 'post'></textarea> </br>
<input type = 'submit' value = 'Submit'>
</form>

图片转代码服务由CSDN问答提供 功能建议

提交表单后,单击后退按钮,页面将显示确认表单重新提交页面。 而不是那样,我实际上只是希望浏览器显示表单本身。 有办法做到这一点? 以下是我的代码的一部分,除了它不会停止刷新之外它的工作原理。 我只想在你点击后退按钮时刷新一次。

 &lt; meta http-equiv =“refresh”content =“0”&gt; 
&lt; form method ='post'action ='submitPost.php?section = $  section'&gt; 
&lt; textarea rows ='10'cols ='100'name ='post'&gt;&lt; / textarea&gt;  &lt; / br&gt; 
&lt; input type ='submit'value ='Submit'&gt; 
&lt; / form&gt; 
   
 
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongsu2807 2015-06-04 17:49
    已采纳

    This is a browser security policy - when you want to go back to a page you loaded using the POST http verb it will always ask you for confirmation.

    打赏 评论

相关推荐 更多相似问题