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


	
	$paymentmodemid=$_POST['paymentmodemid'];
	$paymentmodename=checkvalidstring ($_POST['paymentmodename']);
	$pmodechargetype=checkvalidstring ($_POST['pmodechargetype']);
	$pmodecharge=checkvalidstring ($_POST['pmodecharge']);
	
	

	

	$eve = "update res_paymentmode_master set paymentmodename='$paymentmodename', pmodechargetype='$pmodechargetype', pmodecharge='$pmodecharge'  where paymentmodemid='$paymentmodemid'";

	

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

	{		

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

		header('Location: paymentmode.php');		

	} 

	else 

	{

			

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

		header('Location: paymentmode.php');

	}

?>