这些是javascript的问题,php是服务器本身。

解决方案 »

  1.   

    用数组有个问题,
    没check的,会被跳过。
      

  2.   

    这个问题也经常遇到。需要在提交之前对checkbox进行处理,有种方法是用另外一个input type=hidden 的隐藏域来保存这个checkbox的状态。在提交之前取所有checkbox的值,如果是checked,就将隐藏域的值赋为"yes"(这个由你自己规定),否则赋为"no"。
      

  3.   

    页面中的代码:
    <input type="checkbox" name="isnull[]" id="isnull_'.$rownum.'" value="">
    <input type="hidden" name="colsnull[]" id="colsnull_'.$rownum.'" value="">
    javascript的处理:
    function saveFormSubmit(){
             //....其他代码
    var isnull = document.body.all("isnull[]");
    var colsnull = document.body.all("colsnull[]");
    for(var i=0;i<isnull.length;i++){
    if (isnull[i].checked){
    colsnull[i].value = "yes";
    }else {
    colsnull[i].value = "no";
    }
    }
            //....其他代码
            document.saveForm.submit();//saveForm为表单名
    }
      

  4.   

    <script>
    function checkAll(thisForm){
    var chkbox=thisForm.getElementsByName['test[]'];
    for(var i=0;i<chkbox.length;i++){
    if(chkbox[i].checked){
    break;
    return false;
    }
    }
    }
    </script>
      

  5.   

    我的表述可能不食很清楚register_globals off的情况下接收 表单
    <form action="test" method="post">
    <input type="checkbox" name="test[]" value="1">
    <input type="checkbox" name="test[]" value="2">
    <input type="checkbox" name="test[]" value="3">
    <input type="checkbox" name="test[]" value="4">
    <input type="checkbox" name="test[]" value="5">
    </form>
    的值
    请各位大虾指教?
      

  6.   

    得到的是一个数组,可以用print_r($_POST['test']);来看一下
      

  7.   

    是名为test[]的数组,你不要用"test[]"这个名字!用"test"就好了