Member delete

To delete a member, you need to accept the deleted id, so you need to modify the delete button1.发送id.png

Write code in the controller

2.编写png.png

3.png

4.png

5.png

#Application\Admin\Controller\AdminController.class.php


 //用户删除
     public function del(){
        $admin=D('Admin');
        if($admin->delete(I('id'))){
            $this->success('删除管理员成功!');
        }else{
            $this->error('删除管理员失败!');
        }
    }


Continuing Learning
||
//用户删除 public function del(){ $admin=D('Admin'); if($admin->delete(I('id'))){ $this->success('删除管理员成功!'); }else{ $this->error('删除管理员失败!'); } }
submitReset Code