<?php 
session_start();
include('../includes/dbcon.php');

$str=" ";

$error=0;

$edate=date("Y-m-d");
$userid=$_SESSION['hrm_id'];


$cus_id= trim($_POST['cus_id']);
//$emp_id= trim($_POST['emp_id']);

$userid=$_SESSION['hrm_id'];
$loc_id=$_SESSION['loc_id'];
$emp_id=$_SESSION['hrm_emp_id'];
//echo "ll";
echo $_SESSION['hrm_emp_id'];
///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     Validation    !!!!!!!!!!
//if (empty($emp_id)){ $emp_id=0; }

		if (mysqli_query($con,"delete from temp_customer where userid=$userid  ")or die(mysqli_error($con)))
				{ 


				}


			 	echo $emp_id;

mysqli_begin_transaction($con);

if ( mysqli_query($con,"INSERT INTO temp_customer(userid,cus_id,emp_id) 
			 VALUES($userid,$cus_id,$emp_id )  ")or die(mysqli_error($con)))
	        {

	         
							mysqli_commit($con);
							echo "<script>document.location='day_start_new.php'</script>"; 

			}  
	        

