<?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'];
	$ieuniversity=$_POST['ieuniversity'];
	$iecourse=$_POST['iecourse'];
	$iepercentage=$_POST['iepercentage'];
	$ieduration=$_POST['ieduration'];
	$ienote=$_POST['ienote'];
	$iestatus=$_POST['iestatus'];
	$ietypeofcourse=$_POST['ietypeofcourse'];
	$ieboard=$_POST['ieboard'];
	$iegapyear=$_POST['iegapyear'];
	$ienoofbacklogs=$_POST['ienoofbacklogs'];
	$iefromdate=date("Y-m-d",strtotime($_POST['iefromdate']));
	$ietodate=date("Y-m-d",strtotime($_POST['ietodate']));
	
	
	
		
	
		 $eve1 = "INSERT INTO res_inquiryeduction_detail (imid,iefromdate, ietodate, ieuniversity, iecourse, iepercentage, ietypeofcourse,iestatus,ienote,ieduration,ieaddedon,ieaddedby,ieupdatedon,ieupdatedby,ieboard,iegapyear,ienoofbacklogs) VALUES('$imid1','$iefromdate','$ietodate','$ieuniversity','$iecourse','$iepercentage','$ietypeofcourse','$iestatus','$ienote','$ieduration','$mdate1','$umid','$mdate1','$umid','$ieboard','$iegapyear','$ienoofbacklogs')";
		
		
		
			
		if ($conn->query($eve1) === TRUE)
			{
				$eve11 = "update res_inquiry_master set imstatus='Education 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");
			
	
?>