电热锅炉 家用炉节能:php 高手请进来看看

来源:百度文库 编辑:中科新闻网 时间:2024/05/08 00:56:19
include_once("tconn.php");
$name=$_POST['name'];
$pwd=$_POST['pwd'];
if ($name=="" || $pwd==""){echo "<script>alert('用户名或密码不可以为空!');history.go(-1);</script>";
exit;
}
opendb();
$sql="select id, username, password from sql_users where username='$name' and password='$pwd'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$id = $row[id] ;
if ($id!="") {
session_start();
session_register("username");
$username=$row[username];
header("location:index.php");
}
else {
echo "<script>alert('帐号或密码错误!');history.go(-1);</script>";
}
closedb();

以上代码为什么在php4.4中不能执行