Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Here’s the thing to know about the name attribute: it acts as the glue between your form and the Web application that processes it. Here’s how this works:
Each input control in your form has a name attribute
When you type the elements for a form into your XHTML file, you give them unique names. You saw this with the text inputs:
When you submit a form, the browser packages up all the data using the unique names:
Say you type your name, address, city, state, and zip into the form and click submit. The browser takes each of these pieces of data and labels them with your unique name attribute values. The browser then sends the names and values to the server. Like this: