This is to check if a field is filled out, and for some reason, its not working the way I want it. Do you see any errors?
If something was selected previously, but they didn’t fill out a different field, you will see the page again, but the selection should still be selected, what is happening, is that it isn’t remembering the selected item.
[code=php]echo'<select name=”Gender”>’;
if($_POST[‘gender’] == “Male”){
echo'<option value=”Male” selected>Male</option>’;
}else{
echo'<option value=”Male”>Male</option>’;
}
if($_POST[‘gender’] == “Female”){
echo'<option value=”Female” selected>Female</option>’;
}else{
echo'<option value=”Female”>Female</option>’;
}
echo’
</select>’;