<?php
if($_POST[name]&&$_POST[password]){
setcookie('id',$_POST[name]);
setcookie('pass',$_POST[password]);
echo "<script>location.href='1.php';</script>";
}
if($_COOKIE[id]&&$_COOKIE[pass])
{
echo "登陆成功"<br>"username".$_COOKIE[id]."<br>password".$_COOKIE[pass];
}
?>
<form action="" method="POST">
Username
<input type="text" name="name"><br/><br/>
Password
<input type="password" name="password"><br/><br/>
<input type="submit" value="登陆">
</form>
总是出现:Parse error: syntax error, unexpected '>' in C:\AppServ\www\product\1.php on line 9
麻烦各位!
if($_POST[name]&&$_POST[password]){
setcookie('id',$_POST[name]);
setcookie('pass',$_POST[password]);
echo "<script>location.href='1.php';</script>";
}
if($_COOKIE[id]&&$_COOKIE[pass])
{
echo "登陆成功"<br>"username".$_COOKIE[id]."<br>password".$_COOKIE[pass];
}
?>
<form action="" method="POST">
Username
<input type="text" name="name"><br/><br/>
Password
<input type="password" name="password"><br/><br/>
<input type="submit" value="登陆">
</form>
总是出现:Parse error: syntax error, unexpected '>' in C:\AppServ\www\product\1.php on line 9
麻烦各位!
