<?php
 	session_start(); 

	if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}



$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");
	
	date_default_timezone_set("Asia/Kolkata");
				$mdate1= date('Y-m-d H:i:s');				
				$mdate2= date('d-m-Y');
				$mdate3= date('d-m-Y');
				
				$umid = $_SESSION['umid'];

	
	//$cmname=$_POST['cmname'];
	$imid1=$_POST['imid'];
	$iexpcompanyname=$_POST['iexpcompanyname'];
	$iexpduration=$_POST['iexpduration'];
	$iexpdesignation=$_POST['iexpdesignation'];
	$iexpcountry=$_POST['iexpcountry'];
	$iexpcity=$_POST['iexpcity'];
	
	$iexpfromdate=date("Y-m-d", strtotime($_POST['iexpfromdate']));
	$iexptodate=date("Y-m-d", strtotime($_POST['iexptodate']));
	
	
	
		
	
		$eve1 = "INSERT INTO res_inquiryexperience_detail (imid,iexpcompanyname, iexpduration, iexpdesignation, iexpcountry, iexpcity, iexpfromdate,iexptodate,iexpaddedon,iexpaddedby,iexpupdatedon,iexpupdatedby) VALUES('$imid1','$iexpcompanyname','$iexpduration','$iexpdesignation','$iexpcountry','$iexpcity','$iexpfromdate','$iexptodate','$mdate1','$umid','$mdate1','$umid')";
		
			
		if ($conn->query($eve1) === TRUE)
			{
				$eve11 = "update res_inquiry_master set imstatus='Inquiry Details' where imid=$imid1";
				$re11 = mysqli_query($conn, $eve11);
				$_SESSION['msg'] = "Record has been added successfully";
			}
			else
			{
				$_SESSION['msg1'] = "Error";
			}
	header("Location: inquirydetail.php?id=$imid1&tab=student_education");
			
	
?>