首先要了解sql語句
$SQL="delete from `bkJia` where id in (1,2,4)";
表單大概是:
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="4"/>
<input type="submit"/>
</form>
php函數主要用到implode
$ID_Dele= implode(",",$_POST[ID_Dele]);
$SQL="delete from `user` where id in ($ID_Dele)";