1 | initial version |
To submit multiple values in a single HTML form, you can use either of the following methods:
<input type="text" name="name[]">
<input type="text" name="name[]">
<input type="text" name="name[]">
When the form is submitted, the values of these inputs will be available as an array in whichever programming language you're using to handle the form submission.
<input type="hidden" name="name" value="John">
<input type="hidden" name="age" value="30">
<input type="hidden" name="country" value="USA">
This method is useful when you need to submit values that the user doesn't need to see or edit, such as IDs or timestamps.