<?php
 	session_start();

		include("connect.php");
		include("removespecial.php");
	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
		return;
	}
	
	$brmid=$_SESSION['linkarisebranchid'];
	$umid = $_SESSION['linkariseumid'];
    date_default_timezone_set("Asia/Kolkata");
	$mdate1= date('Y-m-d H:i:s');
	$mdate= date('d-m-Y');


	$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	$partymid=$_POST['partymid'];
	$partyname=$_POST['partyname'];
	$partyaddress=removespecialchar($_POST['partyaddress']);
	
	 $eve = "update res_party_master set partyname='$partyname', partyaddress='$partyaddress',partyupdatedby=$umid,partyupdatedon='$mdate1' where partymid=$partymid";

	if ($conn->query($eve) === TRUE)
	{
		$_SESSION['msg'] = "Record has been updated successfully";
	}else{
				$_SESSION['msg1'] = "Error";

	}
	
		header('Location: expense.php');

?>
