0
我有两个单选按钮,当用户单击一个单选按钮并单击按钮时,它应该保持选中状态。但是,即使我使用第一个单选按钮进行选择和搜索,发生的情况仍然是最后一个。保存表单提交后单选按钮
我的代码:
<input type="radio" <?php if(isset($_POST['gender']) && isset($_POST['gender']) == 'male') echo "checked='checked'"; ?> name="gender" id="male" value="male" onclick="getGender(this.value);" /><strong>Groom</strong>
<input type="radio" <?php if(isset($_POST['gender']) && isset($_POST['gender']) == 'female') echo "checked='checked'"; ?> name="gender" id="female" value="female" onclick="getGender(this.value);" /><strong>Bride</strong>
在此先感谢。