我写了一个php代码,将新员工的数据插入数据库 但现在正在插入 显示
员工失败添加
$query="INSERT INTO 'Employees' (EMP_ID, EMP_Fname, EMP_Mname, EMP_Lname, EMP_Email, EMP_Phone, EMP_Salary, EMP_Supervisor, EMP_jobTitle, EMP_depID, EMP_joiningDate) VALUES('$id', '$Fname' , '$Mname', '$Lname', '$email', '$phone', '$salary', '$supervisore', '$jobTitle', '$depID', '$joiningDate')";
if(isset($_POST['submit'])) {
if(!mysqli_query($link, $query)){
echo '<script type="text/javascript">';
echo 'alert("Employee Falid to added")';
echo ' </script>';
}
else{
echo '<script type="text/javascript">';
echo 'alert("Employee successfully added")';
echo ' </script>';
header("location:addEmployee.html");
exit();
}
}