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

	
	//$cmname=$_POST['cmname'];
	
	
	
	
	$coursemid=$_POST['coursemid'];
	
	
	$clangeligibility=str_replace ("'","\'",$_POST['clangeligibility']);
	$clangeligibility=str_replace ('"','\"',$clangeligibility);
	
	$clangscore=str_replace ("'","\'",$_POST['clangscore']);
	$clangscore=str_replace ('"','\"',$clangscore);
	
	$clangminscore=str_replace ("'","\'",$_POST['clangminscore']);
	$clangminscore=str_replace ('"','\"',$clangminscore);
	
	
	
			 $eve2="insert into res_courselanguage_detail (coursemid,clangeligibility,clangscore,clangminscore,clangtype) values($coursemid,'$clangeligibility','$clangscore','$clangminscore','Language')";
					
			if ($conn->query($eve2) === TRUE)
		{
			
			$_SESSION['msg'] = "Record has been added successfully";
		}else{
			$_SESSION['msg1'] = "Error";
		}
		
		
	
	
	
	
	
		 

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