0

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.

Wiseguy
  • 20,522
  • 8
  • 65
  • 81
Yannis
  • 912
  • 2
  • 14
  • 34
  • Notice that there's a difference between `current submitted value` to `current value`. – Ofir Baruch Mar 07 '12 at 19:37
  • Yes, the current value is actually the previously submitted one. But I need the currently submitted one. I guess I will have to do it with javascript. – Yannis Mar 07 '12 at 19:40
  • I'm a bit confused as to what you mean by the `previous submitted value` - do you mean the one you see on the URL when you submit the form? – enygma Mar 07 '12 at 19:46

1 Answers1

2
<form action="blah" name="blah" onsubmit="blah">
  <input type="text" name="page" value="<?=htmlspecialchars($_GET['page'])?>" />
</form>
Your Common Sense
  • 156,878
  • 40
  • 214
  • 345