HTML drop down or select box for gender options
Database structure for the gender field
The developers use this gender drop down for there HTML forms such as any registrations form, inquiry forms and applications form. Copy following HMTL code in your webpage.
<select name="gender" id="gender">
<option value="">-Select Gender-</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
Select Box of Gender |
Gender Options:
- Male
- Female
- Other
MySQL Database details to stored this drop down values:
Some of developers user the VARCHAR(20) to store these values in the database table. I suggest please user the ENUM data type to stored these values.ENUM ('Male','Female','Other') | Default Value 'Male'
SQL For MySQL database:
ALTER TABLE `tbl_test` ADD `gender` ENUM('Male','Female','Other') NOT NULL DEFAULT 'Male';
Comments
Post a Comment
Thanks for the comment and review. We will connect you soon.