public function login(){
$user = M('users');
$map = array();
$map['username']=$_POST['username'];
$map['userpass']=md5($_POST['userpass']);
$res=$user->where($map)->select();
// dump($res);
if($res==null){
$this->error('用户名或密码错误!');
}else{
session("user",$_POST['username']);
$this->success("欢迎进入!", 'person.html',2);
}
}在登录之后$res里面已经有了我的users表的数据,
但是想问一下各位大大,既然$res里面有了我的数据,怎么把里面的pic列的这条数据存进session里面。(现在{$Think.session.user}是可以查到数据的)
希望能附上一点点具体操作,小弟万分感谢!
最佳答案