前台form提交,后台批量删除 name="bookcheck[]";
$ids = input('bookcheck/a');
$map = array(
'car\_branch\_id' =>
'car\_member\_id' =>
);
if(!is_array($ids)){
$ids\[\]=$ids;
}
foreach($ids as $product_id){
$rst=Db::name()
->where(array('car\_product\_id'=>$product_id))
->where($map)
->delete();
}
if ($rst) {
$this->success('商品删除成功',url('home/Product/good_shopcar'));
}else{
$this->error('商品删除失败',url('home/Product/good_shopcar'));
}
评论 (0)