以下是接收一个表单的测试数据的:
<?php
echo '<meta http-equiv="content-type" content="text/html;charset=utf-8"/>';
//接收数据
//用户id
$id=$_POST['id'];
//2.密码
$password=$_POST['password'];
echo '密码是'.$password;
//简单验证
if($id=="111" and $password=="123"){
///跳转empManage.php页面
header("Location:empManage.php");
exit();
}else{
header("Location:login.php");
echo "数据传值失败";
}
?>
&&(and)用于两个或以上条件的连接语句。