$post ???
我知道是$_post['']获取
但是我要获取的是表单 多选框多个值啊

解决方案 »

  1.   

    <form id="form1" name="form1" method="post" action="">
     <label> 
     <input type="checkbox" name="checkbox" value="game" />
      游戏
      <input name="checkbox" type="checkbox" id="checkbox" value="movie" />
      电影  <input name="checkbox" type="checkbox" id="checkbox" value="music" />
      音乐</label>
      <input type="submit" name="Submit" value="提交" />
    </form>
    <?php
    if ($_POST['checkbox']!=""){
    $box=$_POST['checkbox'];
    echo $box;
    }
    ?>
      

  2.   

    用数组来传递:
    <input type="checkbox" name="Name[]" value="Value_1" />
    ...
    <input type="checkbox" name="Name[]" value="Value_n" />$chk = $_POST["Name"]; //$chk是一个数组
      

  3.   

    <?php
    if ($_POST['checkbox']!=""){
    $box=$_POST['checkbox'];
    foreach ($box as $value){
    echo $value;
    }
    }
    ?>
    是这样吗 出错了啊
      

  4.   

    <form id="form1" name="form1" method="post" action=""> 
      <label>  
      <input type="checkbox" name="checkbox[]" value="game" /> 
      游戏 
       <input name="checkbox[]" type="checkbox" id="checkbox" value="movie" /> 
      电影    <input name="checkbox[]" type="checkbox" id="checkbox" value="music" /> 
      音乐 </label> 
       <input type="submit" name="Submit" value="提交" /> 
    </form> 
      

  5.   

    <form   id= "form1 "   name= "form1 "   method= "post "   action= " ">   
        <label>     
        <input   type= "checkbox "   name= "checkbox[] "   value= "game "   />   
        游戏   
          <input   name= "checkbox[] "   type= "checkbox "   id= "checkbox "   value= "movie "   />   
        电影         <input   name= "checkbox[] "   type= "checkbox "   id= "checkbox "   value= "music "   />   
        音乐   </label>   
          <input   type= "submit "   name= "Submit "   value= "提交 "   />   
    </form>  
      

  6.   

    <form id="form1" name="form1" method="post" action="">
     <label> 
     <input type="checkbox" name="checkbox[0]" value="game" />
      游戏
      <input name="checkbox[1]" type="checkbox" id="checkbox" value="movie" />
      电影  <input name="checkbox[2]" type="checkbox" id="checkbox" value="music" />
      音乐</label>
      <input type="submit" name="Submit" value="提交" />
    </form>
    <?php  //获取复选框多个值
    if ($_POST['checkbox']!=""){
    $box=$_POST['checkbox'];
    foreach ($box as $key=>$value){
    echo $key,$value;
    }
    }
    ?>谢谢 搞定了!!!
      

  7.   

    用数组,设置复选框的名字为name[]