首页上一页 1  下一页尾页 1 条记录 1/1页
        急求纯净水解决错误!!!!
                 	
                        发表在PHP图书答疑
                        2009-04-13                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           <<PHP网络编程自学手册>>第21章的电子商务网站为什么进不去后台管理系统呀?管理员帐号和密码正确,可就是显示"密码输入错误".我不知道为什么不能跳转到后台管理系统,请纯净水前辈速予指点!!!
<?php
class chkinput{
var $name;
var $pwd;
  
function chkinput($x,$y){
$this->name=$x;
$this->pwd=$y;
}
function checkinput(){
include("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:default.php");
}
else{
echo "<script language='javascript'>alert('密码输入错误!');history.back();</script>";
exit;
}
}
}
}
$obj=new chkinput(trim($_POST[name]),md5(trim($_POST[pwd])));
$obj->checkinput();
?>
                
        	
        
        
    <?php
class chkinput{
var $name;
var $pwd;
function chkinput($x,$y){
$this->name=$x;
$this->pwd=$y;
}
function checkinput(){
include("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:default.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会员 购物车
购物车

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







 
                     
                     
					 
						 
						 
						 
						