+ 1

what is the solution for creating forms for male and female?

5th Jul 2016, 9:55 AM
Tidimalo
5 Respuestas
+ 1
<form> <!-- Other form fields here --> <input type="radio" name="gender" value="male" checked> Male<br> <input type="radio" name="gender" value="female"> Female </form>
5th Jul 2016, 2:07 PM
ZinC
ZinC - avatar
+ 1
@Rezaul 'name' should be the same for both. If the form data is to be stored in a user or customer database, there'll be a column called 'gender'. Each row would for instance be: firstName, lastName, age, gender, password..
5th Jul 2016, 5:56 PM
ZinC
ZinC - avatar
0
try to use radiobuttons
5th Jul 2016, 1:39 PM
Kannan Panneer
Kannan Panneer - avatar
0
You can use <input type="radio" name="male" value="male">Male<br/> <input type="radio" name="female" value="female">female<br/>
5th Jul 2016, 3:03 PM
Rezaul Karim
Rezaul Karim - avatar
0
thanks you guys I managed to solve the problem
6th Jul 2016, 5:56 AM
Tidimalo