<?php
 	session_start(); 

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




$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));

	

	

	include("connect.php");
include("mylibrary.php");


	
	$idmid=$_POST['idmid'];
	$idmname=checkvalidstring($_POST['idmname']);

	

	

	$eve = "update res_inquirydocs_master set idmname='$idmname' where idmid='$idmid'";

	

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

	{		

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

		header('Location: document.php');		

	} 

	else 

	{

			

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

		header('Location: document.php');

	}

?>