How to get the currently submitted value in a GET

2019-09-17 03:06发布

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.

标签: php forms
1条回答
别忘想泡老子
2楼-- · 2019-09-17 03:48
<form action="blah" name="blah" onsubmit="blah">
  <input type="text" name="page" value="<?=htmlspecialchars($_GET['page'])?>" />
</form>
查看更多
登录 后发表回答