欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

thinkphp会员登录有关问题

程序员文章站 2024-02-11 18:32:16
...
thinkphp会员登录问题

session_start();
header('Content-Type:text/html; charset=utf-8');
class AdminAction extends Action{
public function index(){
if(isset($_POST['username'])){
if(isset($_POST['username'])&&isset($_POST['password'])){
$db=M();
$select=$db->query("select * from developers where username=".$POST['username']." and password=".$_POST['password']."");
if($select){
$_SESSION['admin']=$_POST['username'];
$this->redirect('Index/index','',2,'用户'.$_POST['username'].'登录成功!');
}else{
$this->redirect('Index/index','',2,'用户名或者密码不正确');
}
}else{
$this->redirect('Index/index','',2,'用户名或密码不能为空!');
}
}
$this->display();
}



}
?>

这是AdminAction代码,不知道怎么回事,不管输入什么或者不输人它都提示用户名或者密码不正确,为什么呢?哪的问题?

网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • thinkphp会员登录有关问题
  • 专题推荐

    作者信息
    thinkphp会员登录有关问题

    认证0级讲师

    推荐视频教程
  • thinkphp会员登录有关问题javascript初级视频教程
  • thinkphp会员登录有关问题jquery 基础视频教程
  • 视频教程分类

    上一篇: ps初学者第九课 白话通道

    下一篇: