//成功! header("Location:ok.php"); exit; } else { header("Location:error.php"); exit; } } else { if ($flag == "addemp1") { //说明用户希望执行添加用户 //接收数据 $name = $_POST['name']; $grade = $_POST['grade']; $email = $_POST['email']; //完成添加->数据 $res = $empService->addEmp1($name, $grade, $email); if ($res == 1) { //成功! header("Location:ok.php"); exit; } else { header("Location:error.php"); exit; } } else { if ($flag == "Useraddemp") { //说明用户希望执行添加用户 //接收数据 $id = $_POST['id']; $name = $_POST['name']; $password = $_POST['password'];