0
What is the use of name part in the code
<input type="radio" name="gender" value="male" />Male <br /> <input type="radio" name="gender" value="female" />Female <br />
4 Réponses
+ 2
When you use Radio Buttons, it allow user to choose only one option from multiple options. In this example you are using Radio Buttons to select user's gender.
Now if user select Male option and submit form, then it will set form object named "gender" with value "male". So in next page when you call user's submitted form object data with named "gender". it will return value "male".
And if user select Female option, then it will return "gender"'s value as "female".
So name is very important part of Radio Buttons to get user's submitted data.
0
thank you (:
0
The return value is a value which is given when you ask for specific information. For example when you go to your user page on facebook it will show your gender and next to it male/female. To make the coding easier the page will ask for the gender and then look the gender up in the database. This is also way more efficient for your storage space.
- 1
I am not understand return value means?