<?php

$empId = $_POST['empId'];
$firstName = $_POST['empFName'];
$lastName = $_POST['empLName'];
$empContact = $_POST['empContact'];
$age = $_POST['age'];
$emergName = $_POST['emergName'];
$emergNo = $_POST['emergNo'];
$emergRelation = $_POST['emergRelation'];
$education = $_POST['education'];



//$query = "UPDATE nam_employees SET empFName = $firstName, empLName = $lastName, empContact = $empContact, empAge = $age, emergName = $emergName,
//emergNo = $emergNo, $emergRelation = $emergRelation, education = $education WHERE empId = $empId";
$query = "INSERT INTO nam_employees (empFName, empLName, empContact, empAge, emergName, emergNo, emergRelation, education) VALUES ('".$firstName."','".$lastName."', '".$empContact."', '".$age."', '".$emergContact."', '".$emergContactNo."', '".$emergRelation."', '".$education."') WHERE empId = $empId";

execsql($query);

header('location: employeeMenu.html');

?>