【发布时间】:2013-08-29 08:21:38
【问题描述】:
我使用下面的代码在表单提交后保持单选按钮选择,但在表单提交后它一直重置到最后一个按钮
<input type="radio" name="button" value="Yes" <?php if(isset($_POST['button']) == 'Yes') echo ' checked="checked"';?> />Yes
<input type="radio" name="button" value="No" <?php if(isset($_POST['button']) == 'No') echo ' checked="checked"';?> />No
如何保留选择?
【问题讨论】:
标签: php forms radio-button