大家看看有什么问题!!!!
$db = mysql_connect("localhost","dbuser_shanxi","dbuser_shanxi")
or die("无法连接数据库!");
mysql_select_db("yymy", $db)
or die("无法选择数据库!");
$result=mysql_query("select * from user where company='$company'");
$arr=mysql_fetch_array($result);
$nums=mysql_num_rows($result);
if($nums!=1)
{ echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "alert('公司名不存在!');";
echo "</script>";
echo "<meta http-equiv=Refresh content=1;url=http://www.yiweimag.com/cn/>";
exit();
}
else
{
if($pwd !=$arr["password"])
{ echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "alert('密码不正确!');";
echo "</script>";
echo "<meta http-equiv=Refresh content=1;url=../index.htm>";
exit();
}
}
怎么提示我有时能进去但有时提示密码错误啊!!!!
$company $pwd 是由登陆页面用表单提交过来的
请高手指点