Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Form Basics The Button Element

3 Answers

When the information in the form gets sent to the server, that info gets stored in name-value pairs.

The server will get that info and store it like this:

user_first-name = "John" user_last-name="Doe"

Here's some reference http://www.w3schools.com/tags/ref_httpmethods.asp

Jeff Lemay
Jeff Lemay
14,268 Points

You can set the name attribute to whatever value you want. It could be name="this_is_a_super_long_and_unnecessary_name_value" or it could be name="name" or name="email_address".

Typically people try to name things to relate to what they're needing for the form. So in this case, "user_name" would be a good choice for a field in a form that is needing a "user_name" for a login or something along those lines.