會員刪除登入

會員刪除

會員刪除,需要接受刪除的id,所以需要修改刪除按鈕1.发送id.png

在控制器中寫程式碼

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('删除管理员失败!');
        }
    }
####### ###下一節
//用户删除 public function del(){ $admin=D('Admin'); if($admin->delete(I('id'))){ $this->success('删除管理员成功!'); }else{ $this->error('删除管理员失败!'); } }
章節課件