error after login html page
so, i got this error in firebug after trying to login to my html page in localhost. i'm trying to build a login page right now. using php and extjs 3.2.1
this is the error on the first of html line
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
my php code using 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();
?>
and i just want to test the page login_success.php page first.
<html>
<body>
Login Successful
</body>
</html>
the html code
<!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/69452.html
上一篇: 解析错误:语法错误,意外的')'
下一篇: 登录html页面后出现错误