登录html页面后出现错误
所以,我试图登录到本地主机的html页面后,在萤火虫中出现此错误。 我正试图建立一个登录页面。 使用php和extjs 3.2.1
这是第一个html行的错误
DOCTYPE HTML PUBLIC“ - // W3C // DTD HTML 4.01 // EN”“http://www.w3.org/TR/html4/strict.dtd”
我的php代码使用php5.3.10
<?php
ob_start();
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="my_db"; // Database name
$tbl_name="my_user"; // Table name
mysql_connect("$host", "$Username", "$Password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$Username=$_POST['Username'];
$Password=$_POST['Password'];
$Username = stripslashes($Username);
$Password = stripslashes($Password);
$Username = mysql_real_escape_string($Username);
$Password = mysql_real_escape_string($Password);
$sql="SELECT * FROM $tbl_name WHERE Username='$Username' and Password='$Password'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_register("Username");
session_register("Password");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
ob_end_flush();
?>
我只想先测试页面login_success.php页面。
<html>
<body>
Login Successful
</body>
</html>
html代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- library-->
<title>Sign In</title>
<link rel="stylesheet" type="text/css" href="./../ext-3.2.1/resources/css/ext-all.css"/>
<!-- GC -->
<!-- LIBS -->
<script type="text/javascript" src="./../ext-3.2.1/adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="./../ext-3.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="css/forms.css"/>
<!-- <link rel="stylesheet" type="text/css" href="./../ext-3.2.1/shared/examples.css"/>- ->
<center><img src="image/logonew.png" width="900" height="420"></center>
<div id="Sign In" style="margin:auto;"></div>
<style type="text/css">
div {text-align:center}
</style>
</head>
<body>
<script type="text/javascript" src="js/sign_in.js"></script>
</body>
</html>
链接地址: http://www.djcxy.com/p/69451.html