<?php include_once conn.php";?>
<?php 
$laiu=$_POST["shangu"];
$laim=$_POST["shangm"];
$laim=md5($laim);//写数据库时候也用MD5了
$sql=mysql_query("select from biao where username='$laiu' and password='$laim'");
if($sql==0){
echo "o,shit";
exit();
}else{
echo "登陆成功了";
}
?>
-------------------------
怎么老是不能登陆! 闷!

解决方案 »

  1.   

    可以这样写的吗?
    "select from biao where username=
      

  2.   

    "select  * /id   起码要加个字段吧。。要不然就用*   
      

  3.   

    没什么可解释的。。你的select from biao    select后面都为空怎么查询呢? 起码要加个字段。或者* 
      

  4.   

    $sql=mysql_query("select * from biao where username='$laiu' and password='$laim'");
    随便输入什么都登陆成功! 汗
      

  5.   


    <?php include_once conn.php";?>
    <?php 
    $laiu=$_POST["shangu"];
    $laim=$_POST["shangm"];
    $laim=md5($laim);//写数据库时候也用MD5了
    $sql=mysql_query("select * from biao where username='$laiu' and password='$laim'");
    if($sql){
        echo "登陆成功了";
    }else{
        echo "o,shit";
        exit();
    }
    ?>这样呢。
      

  6.   

    <?php include_once "conn.php";?>   少个引号吧。