<?php
 	session_start(); 

	if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}
	
	
	$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");

	$cremid=$_POST['cremid'];
	$cusername=$_POST['cusername'];
	$collegemid=$_POST['collegemid'];
	$cpassword=$_POST['cpassword'];
	$curl=$_POST['curl'];
	$cremark=$_POST['cremark'];

	
	
	$eve = "update  res_credential_master set cusername='$cusername',collegemid='$collegemid',cpassword='$cpassword',curl='$curl',cremark='$cremark' where cremid=$cremid";
	
	
	if ($conn->query($eve) === TRUE)
	{
			
		$_SESSION['msg'] = "Record has been updated successfully";
		header('Location: credential.php');
			
	}
?>