Most applications probably don’t need to specify gender, but if it is absolutely necessary, I would also advise you to specify the option “Other” and “Unknown”, the first for people who do not quite fit into the binary file. gender model and another, if a person decided not to disclose it.
For these 4 values, the easiest way would be to save them in your database as CHAR(1) or ENUM("F", "M", "O", "U") (note that I selected them in alphabetical order instead surprisingly typical "first men").
source share