当前位置:编程学习 > php >>

php 我想把复选框的内容插到mysql中 一次多个选项怎么做

<form id="form1" name="form1" method="post" action=""> <input type="text" name="textfield" /><br> <input name="checkbox" type="checkbox" value="打篮球" />打篮球 <input name="checkbox" type="checkbox" value="踢足球" />踢足球 <input name="checkbox" type="checkbox" value="打台球" />打台球<br> <input name="submit" type="submit" value="提交"> </form> <?php $submit =$_POST["submit"]; $text =$_POST["textfield"]; $text1 =$_POST["checkbox"]; $link_ID = mysql_pconnect('localhost','root',''); if(mysql_select_db('qq',$link_ID)){ //echo "OK"; }else{ echo "NG"; } $insert = "insert into ww value('".$text."','".$text1."')"; if($submit!=""){ $rs = mysql_query($insert); } ?> 怎么改一下????
追问:for???  for 是循环吧
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,