开发者

Need help echoing the checked boxes selected by the user

How to display selected c开发者_运维问答heckbox? I tried but it didnt work

<input type=checkbox value="Administrative"<?php echo ($industry_sector1a == 'Administrative' ? 'selected="selected"' : ''); ?>name="industry_sector1"> Administrative

I use the below for drop down boxes .

 <option value="-1"<?php echo ($native_language == '-1' ? 'selected="selected"' : ''); ?>>----- Please Select -----</option>
                <option value="1"<?php echo ($native_language == '1' ? 'selected="selected"' : ''); ?>>English - United States</option>


<input type="checkbox" checked="checked" name="foo" />bar


Yo need to use

<input type="checkbox" value="Administrative" <?php echo ($industry_sector1a == 'Administrative') ? 'checked="checked"' : ''; ?> name="industry_sector1"> Administrative
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜