I have a drop menu as below and when submitted it sends either no value, male or female to the database.
<select id="gender" name="gender"> <option selected="selected" value=""/> </option> <option value="Male">Male</option> <option value="Female">Female</option> </select>
Now when i go back to the page i want it to show the value that was previously selected/stored in database.
Basically the php code i have at the moment is to get the values and it sends to database. I already have a while loop so all i need to do is $row[gender] to get get value but how i implement it into the drop menu html code i don't know.
<?php $gender = $_POST['gender']; ?>
Can someone please help on how i show the previously selected value that is stored in the database.
Thanks for any help.
Edited by genieuk: n/a