form elements which have no name

did you know that if you skip the name attribute on a form’s element, the server might get confused and not do what you’d expect it to!

lesson: always make sure name as well as id are included as part of the form element’s definition.

correct example:


<form method="post" action="me.whatever">

<input id="thisisme" name="thisisme" type="text" value="testvalue"/>

<input type="submit"/>

</form>

incorrect example:


<form method="post" action="me.whatever">

<input id="thisisme" type="text" value="testvalue"/>

<input type="submit"/>

</form>

Advertisements