thinkphp $model_user->create($data)数据格式不对
protected $_validate = array(
array('name','require','用户名不能为空'),
array('passwd','require','密码不能为空')
);
function login() {
$model_user = D("User");
$data = array(
'name' => $this->_post('name'),
'passwd' => $this->_post('passwd')
);
if (!$model_user->create($data)){
$this->error($model_user->getError(),U('uc/login'));
}else {
}
如题 ,我想做个登录自动验证,怎么也不好使 求高手解答