网页登陆有关问题

WBOY
Release: 2016-06-13 13:31:59
Original
898 people have browsed it

网页登陆问题
用php做的图书馆管理系统,连上了数据库,可是在网页上登陆时老是提示“管理员名称错误”,究竟会是哪里出了问题呢?实际上管理员的名称和密码都没有出错

------解决方案--------------------
把sql打印出来,在查询器里执行一次看看
------解决方案--------------------

探讨
include("conn/conn.php"); //连接数据源
$sql=mysql_query("select * from tb_manager where name='".$this->name."' and pwd='".$this->pwd."'",$conn);
$info=mysql_fetch_array($sql); //检索管理员名称和密码是否正确
if($info==false){ //如果管理员名称或密码不正确,则弹出相关提示信息
echo "";
exit;
}

------解决方案--------------------
$obj=new chkinput(trim($name),trim($pwd)); //创建对象
$name和$pwd从何而来。你定义的是
$A_name=$_POST[name]; //接收表单提交的用户名
$A_pwd=$_POST[pwd]; //接收表单提交的密码
------解决方案--------------------
var_dump调试返回值是啥
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!