问题
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