<?php
session_start();
require_once("config/configDB.php"); 

function validation_input($data) {
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {

    $employeename   = stripslashes($_POST['employeename']);
    $address        = stripslashes($_POST['address']);
    $employeecode   = stripslashes($_POST['employeecode']);
    $mobile         = stripslashes($_POST['mobile']);
	 $shiftworkamt         = 0;
    $extrahoursamt         = 0;
	
    $createdate  	= date("Y-m-d");
    $createdby      = $_SESSION['username'];
    $userID         = $_SESSION['user_id'];

    $sql  = "INSERT INTO employee_master ( ename, eaddress, mobile, ecode,shiftworkamt,extrahoursamt, isdelete,createdby,userID,createdate) VALUES ('$employeename', '$address',    '$mobile', '$employeecode','".$shiftworkamt."','".$extrahoursamt."', '1','".$createdby."','".$userID."','".$createdate."')";

    mysqli_query($conn,$sql);

    $employeeID = mysqli_insert_id($conn);
    
    header("Location:employeeMasterDashboard.php");

}





?>