Welcome to the Treehouse Community
Looking to learn something new?
Tejveer GrewalCourses Plus Student 2,937 Points
y we use name="user_name"
still not clear y we use the name="user_name"
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 Lemay14,266 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.