HTML Form: why action can't have get value in it?
forms, html
Solution
It's because the "method=get" section of the form implies that the query values have to come from the form values.
The collection which contains "id=value" is overidden by the collection containing the form values.
This behaviour seems to be built into each browser, so I expect that it's part of the HTML specification.
Update
Ahah:
This has been asked before: submitting a GET form with query string params and hidden params disappear
To Quote:
As the specifications (RFC1866, page 46; HTML 4.x section 17.13.3) state:
If the method is "get" and the action is an HTTP URI, the user agent takes the value of action, appends a `?' to it, then appends the form data set, encoded using the "application/x-www-form-urlencoded" content type.
Problem
When i try the following structure, it does't send `id=value` ``` <form action="some.php?id=value" method="get"> <input name="name1" value="value1"> <input type="submit"> </form> ``` I know that i can send `id=value` in hidden field, but it's interesting, why it doesn't allow such structure?