加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php 获取 radio多选项值代码

发布时间:2020-12-13 20:54:40 所属栏目:PHP教程 来源:网络整理
导读:php 获取 radio多选项值代码: formmethod=get inputtype= radio name= sex id= sex1 value= 1 /label for = sex1 男朋友/label inputname= sex id= sex2 type= radio value= 2 checked= checked /label for = sex2 女朋友/label inputname= sex type= radio

php 获取 radio多选项值代码:

  1. <form method=get> 
  2. <input type="radio" name="sex" id="sex1" value="1" /><label for="sex1">男朋友</label> 
  3.     <input name="sex" id="sex2" type="radio" value="2" checked="checked" /><label for="sex2">女朋友</label> 
  4.     <input name="sex" type="radio" id="sex3" value="" checked="checked" /><label for="sex3">不限</label>&nbsp;&nbsp; 
  5. <input name="提交" type="submit" /> 
  6. </form> 
  7. <? 
  8. if$_GET ) 
  9.  echo $_GET['sex'] ; 
  10. }?> 

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读