无为清净楼资源网 Design By www.qnjia.com
首先要了解sql语句
$SQL="delete from `jb51` 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)";

https://www.jb51.net/article/6488.htm
标签:
PHP,批量删除,sql

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com