日期:2014-05-17 浏览次数:20445 次
<html>
<title>
登陆界面
</title>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<form action="loginController.php" method="post">
<table>
<tr><td>用户名:</td><td><input type="text" name="username"/></td></tr>
<tr><td>密码:</td><td><input type="text" name="password"/></td></tr>
<tr><td><input type="submit" value="登陆"/><td><input type="reset" name="重新填写"/></td></tr>
</table>
</form>
</body>
</html>
loginController.php
<html>
<title>
验证控制器
</title>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<?php
$username=$_REQUEST['username'];
$password=$_REQUEST['password'];
if($username=='123'&&$password=='123'){
header("location:Manage.php");
exit();
} else{
echo '账号密码有误';
}
?>
</body>
</html>
<html>
<title>
管理界面
</title>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<h1>欢迎管理员</h1>
</body>
</html>
输入用户名密码123
错误提示如下:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\sqlInjcetion\loginController.php:9) in C:\wamp\www\sqlInjcetion\loginController.php on line 13
求解!
另外3个php文件都是utf-8编码