首页上一页 1  下一页尾页 2 条记录 1/1页
        
                        发表在PHP图书答疑
                        2013-09-09                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           <?php
header ( "Content-type: text/html; charset=gb2312" ); //设置文件编码格式
class chkinput{
var $name;
var $pwd;
function chkinput($x,$y)
{
$this->name=$x;
$this->pwd=$y;
}
function checkinput()
{
include("../conn/conn.php");
$sql=mysql_query("select * from tb_admin where name='".$this->name."'",$conn);
$info=mysql_fetch_array($sql);
if($info==false)
{
echo "<script language='javascript'>alert('不存在此管理员!');history.back();</script>";
exit;
}
else
{
if($info[pwd]==$this->pwd){
header("location:index.php");
}
else
{
echo "<script language='javascript'>alert('密码输入错误!');history.back();</script>";
exit;
}
}
}
}
$obj=new chkinput(trim($_POST[name]),md5(trim($_POST[pwd])));
$obj->checkinput();
?>
这个就是那个数据库连接的程序为什么我在数据库里面插入了用户名和密码之后还是不能登录到后台呢????
                
        	
        
        
    header ( "Content-type: text/html; charset=gb2312" ); //设置文件编码格式
class chkinput{
var $name;
var $pwd;
function chkinput($x,$y)
{
$this->name=$x;
$this->pwd=$y;
}
function checkinput()
{
include("../conn/conn.php");
$sql=mysql_query("select * from tb_admin where name='".$this->name."'",$conn);
$info=mysql_fetch_array($sql);
if($info==false)
{
echo "<script language='javascript'>alert('不存在此管理员!');history.back();</script>";
exit;
}
else
{
if($info[pwd]==$this->pwd){
header("location:index.php");
}
else
{
echo "<script language='javascript'>alert('密码输入错误!');history.back();</script>";
exit;
}
}
}
}
$obj=new chkinput(trim($_POST[name]),md5(trim($_POST[pwd])));
$obj->checkinput();
?>
这个就是那个数据库连接的程序为什么我在数据库里面插入了用户名和密码之后还是不能登录到后台呢????

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
               			  
                







 
                     
                     
					 
						 
						 
						 
						