I have a form with input type-select
however when page submit and post back with error message
The select value is clean, I try to use radio button (checked unchecked) to retain the value,
yet it is not working.
//HTML///////////////////////////////////////////////////////////////////
<select name="age">
<option value="">Age</option>
<option value="14-17" <?PHP echo $age_14; ?>>14 - 17</option>
<option value="18-29" <?PHP echo $age_18; ?>>18 - 29</option>
</select>
//PHP////////////////////////////////////////////////////////////////////
$age_14="unchecked";
$age_18="unchecked";
$age=$_POST['age'];
if($age=='14-17'){$age_14="checked";}
else if($age=='18-29'){$age_18="checked";}
With
selecttag you have to useselected="selected"notchecked.Try with: