<?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));

	
	$umid = $_SESSION['umid'];
	

	include("connect.php");



	
	$countrymid = $_POST['countrymid'];
	$tmmid = $_POST['tmmid'];
	$traningservicemid = $_POST['traningservicemid'];
	$traningsubservicemid = $_POST['traningsubservicemid'];
	
	
	
		$eve = "update res_traningmodule_master set countrymid='$countrymid',traningsubservicemid='$traningsubservicemid',traningservicemid='$traningservicemid',tmupdatedby='$umid',tmupdatedon='$mdate1'  where tmmid='$tmmid'";
		
		
		
	
	

	

	

	if ($conn->query($eve) === TRUE)

	{		

		$_SESSION['msg'] = "traningmodule Record Updated succesfully";

		header('Location: traningmodule.php');		

	} 

	else 

	{

			

		$_SESSION['msg1'] = "Error";

		header('Location: traningmodule.php');

	}
	

?>