首页 > 开发 > PHP > 正文

php 获取 radio多选项值代码

2024-05-04 21:57:55
字体:
来源:转载
供稿:网友

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. }?> 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表