<?php
 	session_start(); 

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



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

	
	//$visatype=$_POST['visatype'];
	$cusername=$_POST['cusername'];
	$collegemid=$_POST['collegemid'];
	$cpassword=$_POST['cpassword'];
	$curl=$_POST['curl'];
	$cremark=$_POST['cremark'];
	
	$eve1 = "INSERT INTO res_credential_master (cusername,collegemid,cpassword,curl,cremark) VALUES('$cusername','$collegemid','$cpassword','$curl','$cremark')";
	$re1 = mysqli_query($conn, $eve1);
			
	$_SESSION['msg'] = "Record saved successfully";
	header('Location: collegedetail.php?id='.$collegemid);
			
	
?>