<?php
include("../include/session.php");
if(!$session->logged_in){
    header("Location: ../main.php");
}else{
	include("../include/db.php");
	$empId= mysql_real_escape_string($_POST['empId']);
	$empContact = mysql_real_escape_string($_POST['empContact']);
	 //$pob = mysql_real_escape_string($_POST['pob']);
	$empMStatus = mysql_real_escape_string($_POST['empMStatus']);
	$empPass = mysql_real_escape_string($_POST['empPass']);
	$empRes = mysql_real_escape_string($_POST['empRes']);
	$empAccNo = mysql_real_escape_string($_POST['empAccNo']);
	$empBranch = mysql_real_escape_string($_POST['empBranch']);
	$empDepend = mysql_real_escape_string($_POST['empDepend']);
	$empPos = mysql_real_escape_string($_POST['empPos']);
	$empSection = mysql_real_escape_string($_POST['empSection']);
	//$empDateEmp = $_POST['empDateEmp'];
	$emergName = mysql_real_escape_string($_POST['emergName']);
	$emergNo = mysql_real_escape_string($_POST['emergNo']);
	$emergRelation = mysql_real_escape_string($_POST['emergRelation']);
//	$education = mysql_real_escape_string($_POST['education']);
	$empShoe = mysql_real_escape_string($_POST['empShoe']);
	$empOverall = mysql_real_escape_string($_POST['empOverall']);
	//$empEmployDate = $_POST['empEmployDate'];
	$empRate = mysql_real_escape_string($_POST['empRate']);
	$empBank = mysql_real_escape_string($_POST['empBank']);
	$today = isset($_REQUEST["date1"]) ? $_REQUEST["date1"] : "";

	
	$query = "UPDATE nam_employees SET empContact='$empContact', empMStatus='$empMStatus', empPass='$empPass', empRes='$empRes', empBank = '$empBank',empAccNo='$empAccNo', empBranch='$empBranch', empDepend='$empDepend', empPos='$empPos', empSection='$empSection', empDateEmp='$today', emergName='$emergName', emergNo='$emergNo', emergRelation='$emergRelation', empShoe='$empShoe', empOverall='$empOverall', empEmployDate='$empEmployDate', empRate='$empRate' WHERE empId ='$empId'";
//	echo $query;
	$r = execsql($query);

	header("Location: employeeMenu.php");
}
?>
