$mm = md5(密码);
select * from user_tab where u_tel='$1398' and password = $mm试试

解决方案 »

  1.   

    md5()不是mysql中的函数 是这个样子吧!!!!
      

  2.   

    "select * from user_tab where u_tel='$138' and password='" + md5('$88') + "'"
      

  3.   

    "select * from user_tab where u_tel='$138' and password='".md5('$88')."'"
      

  4.   

    是啊,md5是php的函数啊
    怎么能直接放到sql里
      

  5.   

    在SQL里面不可以用函数 如md5等
    上次我也是放MD5进去  不报错 查询不了数据取消了就好哦
      

  6.   

    <?php
    SESSION_START();
    require "../config.ini.php";
    $name=$_POST['name'];
    $rpassword=$_POST['password'];
    $password=MD5($rpassword);
    $result=mysql_query("select * from liu_admin where name='$name'");
    $num=mysql_fetch_object($result);
    if($num->name!=$name)
    {
    echo "<script>alert('请检查用户名!');location.href='login.php';</script>";

    }else if($num->password!=$password)
    {
    echo "<script>alert('请检查密码!');location.href='login.php';</script>";
    }else
    {
    $_SESSION['seiname']=$name;
    $_SESSION['seipass']=$password;
    echo "<meta http-equiv=refresh content=0;URL=main.php>";
    }
    ?>我登陆是这样子写的...