标题: php求解,为什么出错?
时间: 2012-12-17
<?php
include "conn.php";
include "head.php";
$pwd=$_POST["pwd"];
$user=$_POST['username'];
$md5pwd=md5(md5(md5($pwd)));
if($pwd==NULL || $user==NULL)
{
exit('请输入帐号密码');
}
$sql=mysql_query("select username,password from user where username='$username' and password='$md5pwd'",$connect);
$fetch=mysql_fetch_array($sql);
if($sql)
{
echo 'sql执行成功';
}else{
echo '执行失败';
}
if($fetch<>0)
{
echo '登陆成功';
echo $fetch['uid'];
}else{
echo '登陆失败';
}
?>
『回复列表(10|隐藏机器人聊天)』