$sql="select * from wyx_user where wyx_name='$wyx_name'&&wyx_pass='$wyx_pass'";
从来没看见过SQL语句这么些的$sql="select * from wyx_user where wyx_name='$wyx_name' and wyx_pass='$wyx_pass'";

解决方案 »

  1.   


    一开始就是and
    后来不行改成了&&
    现在改回and还是不行
      

  2.   

    echo $sql
    看看SQL语句是啥!
      

  3.   

    $sql="select * from wyx_user where wyx_name='$wyx_name'&&wyx_pass='$wyx_pass'";/*  注释掉先
    if($_SESSION['verifyCode'] <> $pageRandCode)
    {  
        echo '<script>alert("验证码有误!");   
        location.replace ("index.php")</script>';   
    }
    elseif($rs=$w->select($sql))
    {
        setcookie("wyx",$wyx_name,time()+3600000);
        echo '<script>location.replace("admin_index.php")</script>';
    }
    else
    {
        $str="<SCRIPT language=JavaScript>alert(' 用户名或密码错误!');javascript:history.go(-1)</SCRIPT>";
        echo $str;
    }
    */不要使用你的那个DB类,直接用MySQL函数查询下数据库,然后取出结果看看!还有你那个&&两边连个空格都没有!