+ 2
Whatâs the name tag inside input do?
2 Answers
+ 9
The name attribute specifies the name of an <input> element.
The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.
Note: Only form elements with a name attribute will have their values passed when submitting a form.
https://www.w3schools.com/tags/att_input_name.asp
+ 1
When a form is submitted, its data gets transmitted as a set of name=value tokens. The receiving framework can then interpret these - e.g. in php they become the $_GET and $_POST associative arrays.