<?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');
$mdate= date('d-m-Y');
$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	$umid = $_SESSION['umid'];
	include("connect.php");
include("mylibrary.php");
	
	//$cmname=$_POST['cmname'];
	
	
	
	
	$coursemid=$_POST['coursemid'];
	
	
	$ctermmonth=checkvalidstring ($_POST['ctermmonth']);
	
	
	
	
			 $eve2="insert into res_courseintaketerm_detail (coursemid,ctermmonth) values($coursemid,'$ctermmonth')";
					
			if ($conn->query($eve2) === TRUE)
		{
			
			$_SESSION['msg'] = "Record has been added successfully";
		}else{
			$_SESSION['msg1'] = "Error";
		}
		
		
	
	
	
	
	
		 

	header("Location: coursedetail.php?id=$coursemid");
			
	
?>