I have a form in which there is a select option for Gender, what i want to achive is if my validator fails then its get redirect back with old inputs. but i dont know how to populate my select option with old value.
<select id="gender" name="gender"> <option value="male">Male</option> <option value="female">Female</option> </select>
I have another question. I have user table in which user has role. When admin update user record his role dropdown should contain all roles but the selected role should be his role which is in his record
Role Dropdown - HR Manager ----> selected ..as stored in database Admin Superadmin