1,login.php
<html>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<body>
<h1>管理员登录</h1>
<form action="loginProcess.php" method="post">
<table>
<tr><td>用户ID:</td><td><input type="text" name=“id”></td></tr>
<tr><td>密码:</td><td><input type="text" name="password"></td></tr>
<tr><td><input type="submit" value="登录"></td>
<td><input type="reset" value="重新填写"></td>
</tr>
</table>
</form></body>
</html>
2,loginProcess.php
<?php 
 header("content-type:text/html;charset=utf-8");
$id=$_POST["id"];
$password=$_POST['password'];
if($id=="admin"&&$password=="admin"){
header("localtion:empManage.php");
}
else {
header("localtion:login.php?errno=1");
exit();
}
?>可是我点提交的时候,居然显示
Notice: Undefined index: id in D:\wamp1\www\emp\loginProcess.php on line 3