<?php
 	session_start(); 

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

date_default_timezone_set("Asia/Kolkata");
	$mdate1= date('Y-m-d H:i:s');
	

$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");

	$umid = $_SESSION['umid'];
	//$tmdocument=$_POST['tmdocument'];
	
	
	$tmmid = $_POST['tmmid'];
	
	$traningdocsmid = $_POST['traningdocsmid'];
	
	
	
	
	
		 $eve1 = "INSERT INTO res_traningmoduledoctype_detail (	traningdocsmid,tmmid) VALUES('$traningdocsmid',$tmmid)";
		$re1 = mysqli_query($conn, $eve1);
		$_SESSION['msg'] = "Record saved successfully";

		
		
	header('Location: traningmoduledoctypedetail.php?id='.$tmmid);
	
	
			
	
			
	
?>