A real browser will generate the key of the post variable from a form element's name or id. Right now our browser will only use the id.
So this form:
<form method="post" action="results">
<input type="hidden" name="post-id" value="1" />
<input type="submit" name="save-button" value="save" />
</form>
Should produce this post data:
post-id=1&save-button=save
And this form should produce the same post data:
So this form:
<form method="post" action="results">
<input type="hidden" id="post-id" value="1" />
<input type="submit" id="save-button" value="save" />
</form>
I'm not sure how a real browser would resolve an element with an id and a name.
A real browser will generate the key of the post variable from a form element's name or id. Right now our browser will only use the id.
So this form:
<form method="post" action="results">
<input type="hidden" name="post-id" value="1" />
<input type="submit" name="save-button" value="save" />
</form>
Should produce this post data:
post-id=1&save-button=save
And this form should produce the same post data:
So this form:
<form method="post" action="results">
<input type="hidden" id="post-id" value="1" />
<input type="submit" id="save-button" value="save" />
</form>
I'm not sure how a real browser would resolve an element with an id and a name.