<?php
 	session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);	

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

	
	
	$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");
include("mylibrary.php");
	
	
	 $umid = $_POST['umid'];
	 $abmid = $_POST['abmid'];
	
	
		
		
	
	$abcontactname=checkvalidstring ($_POST['abcontactname']);
	
	
	$abmobilenumber=checkvalidstring ($_POST['abmobilenumber']);
	
	
	$abemailid=checkvalidstring ($_POST['abemailid']);
	
	
	$bcontactdepartmnet=checkvalidstring ($_POST['bcontactdepartmnet']);
	
	
	$bcposition=checkvalidstring ($_POST['bcposition']);
	
	
	$abname=checkvalidstring ($_POST['abname']);
	$bcremarks=checkvalidstring ($_POST['bcremarks']);
		 $eve2 = "update res_agentbranch_master set abname='$abname',abcontactname='$abcontactname',abmobilenumber='$abmobilenumber',abemailid='$abemailid',abdepartment='$bcontactdepartmnet',abposition='$bcposition',abcremarks='$bcremarks' where abmid=$abmid ";
			$re2 = mysqli_query($conn, $eve2);
	
			
		
		
		
		
		
		header('Location: agentdetail.php?id='.$umid);
	
?>