将多选匡的值: A,B,C,D转换成 'A','B','C','D' 代入删除Sql的条件中去

解决方案 »

  1.   

    use a hidden input field to record the ids of the selected options , like "1,2,3...."then after submit ,  use $ar = explode(",",$_POST['ids']); to get them into an array.
      

  2.   

    or you can do this : name all the checkbox fields "checkid[]"when submit, you can use $_POST['checkid'][] to get the data .
      

  3.   

    把你的CHECKBOX取成名为“checkbox[]”;
    它们的值比方说是它们的ID,则你取的ID就进行删除
      

  4.   

    做javscript来实现全选,再把选中的还同有选择的用不用的表示,用hidden进行保存
      

  5.   

    '循环显示要删除的ID
     "<input type='checkbox' name='fid' value='".fid."'>"执行sql删除
    数字型id的sql格式
    sql = "delete from 表 where id in (".$fid.")"字符型id的sql格式
    sql = "delete from 表 where id in ('".str_replace( str_replace($fid," ",""),"," ,"','")."')"