alert('两次密码输入不一致!');history.back();"; exit; } } $result = $conn->query("SELECT * FROM employee WHERE id=" . (int)$employee_id); if ($row = $result->fetch_assoc()) { $changeSuccess = 1; $sql = "UPDATE employee SET em_email='" . $conn->real_escape_string($em_email) . "', em_tel='" . $conn->real_escape_string($em_tel) . "'"; if ($editpwd) { if ($em_password === $row['em_password']) { $sql .= ", em_password='" . $conn->real_escape_string($pwd) . "'"; $changeSuccess = 2; } else { $changeSuccess = 3; } } $sql .= " WHERE id=" . (int)$employee_id; $conn->query($sql); if ($changeSuccess == 1) { echo ""; } elseif ($changeSuccess == 2) { echo ""; } else { echo ""; } exit; } } $result = $conn->query("SELECT em_email, em_tel FROM employee WHERE id=" . (int)$_SESSION['employee_id']); $row = $result->fetch_assoc(); $em_tel = $row['em_tel'] ?? ''; $em_email = $row['em_email'] ?? ''; ?>