diff --git a/adminPages/AddEmployee.php b/adminPages/AddEmployee.php index 9e646e7..2cd060c 100644 --- a/adminPages/AddEmployee.php +++ b/adminPages/AddEmployee.php @@ -2,6 +2,24 @@ require("../dbCon.php"); require("../commonFunctions.php"); +if (isset($_GET['LastName'])){ + $query = "INSERT INTO employees (password, LastName, FirstName, Title, TitleOfCourtesy, + BirthDate, HireDate, Address, City, Region, + PostalCode, Country, HomePhone, Extension, Notes, + ReportsTo, Salary) + VALUES(?,?,?,?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,?)"; + $stmt = $con->prepare($query); + $stmt ->bind_param("sssssssssssssssdd", $_GET['Password'], $_GET['LastName'], $_GET['FirstName'], $_GET['Title'], $_GET['TitleOfCourtesy'], + $_GET['BirthDate'], $_GET['HireDate'], $_GET['Address'], $_GET['City'], $_GET['Region'], + $_GET['PostalCode'], $_GET['Country'], $_GET['HomePhone'], $_GET['Extension'], $_GET['Notes'], + $_GET['ReportsTo'], $_GET['Salary']); + + $stmt ->execute(); + +} ?> @@ -14,11 +32,74 @@ require("../commonFunctions.php");