How to get the currently submitted value in a GET form

有些话、适合烂在心里 提交于 2020-01-07 05:05:09

问题


I have a very simple GET form with one text field:

<form action="blah" method="get" name="blah" onsubmit="blah">
  <input type="text" name="page" value="blah" />
</form>

What I want is to get the current submitted value from the url:

$page_value = $_REQUEST["page"];

but this will only get the previous submitted value, not the current one.


回答1:


<form action="blah" name="blah" onsubmit="blah">
  <input type="text" name="page" value="<?=htmlspecialchars($_GET['page'])?>" />
</form>


来源:https://stackoverflow.com/questions/9607851/how-to-get-the-currently-submitted-value-in-a-get-form

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!