删除用户执行出错

浏览:437 发布日期:2014/05/07 分类:求助交流 关键字: delete方法
下面是delete方法:public function del(){
        if(!empty($this->aid)){
            $uid = trim($this->_get('name'));
            if($uid>0){
                $res = M('Admin')->where(array('name'=>$uid))->delete();
                if($res){
                    $this->success('删除成功',U('Usermanage/index'));
                    exit;
                }else{
                    $this->error('删除失败',U('Usermanage/index'));
                    exit;
                }
            }else{
                $this->error('参数错误',U('Usermanage/index'));
            }                 
        }else{
            $this->display('Usermanage/index');
        }
    }
下面是信息页面内的部分代码 <form action="__URL__/add" method="post" >

    用户名:<input type="text" id="inputName" name="mname" value='{$Usermanage.mname}'><br><br>
    用户密码:<input type="password" id="inputPassword" name="password" value='{$Usermanage.password}'><br><br>
    确认提交:<input type="submit" name="提交">
</form>  
在执行时,删除方法未生效。求解。。。谢谢。
最佳答案
评论( 相关
后面还有条评论,点击查看>>