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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s