<?php
 	session_start();

		include("connect.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));

	$itype="";
	$partymid=$_POST['partymid'];
	$partyname=$_POST['partyname'];
	$partyaddress=$_POST['partyaddress'];
	$partycity="";
	$partycpname=$_POST['partycpname'];
	$partyemail=$_POST['partyemail'];
	$partymobile=$_POST['partymobile'];
	$cpincode="";
	$partystate=$_POST['partystate'];
	$cstatecode="";
	$partygstno=$_POST['partygstno'];
	
	 $eve = "update res_party_master set partyname='$partyname', partyaddress='$partyaddress', partycity='$partycity', partycpname='$partycpname', partyemail='$partyemail', partymobile='$partymobile', partypincode='$cpincode', partystate='$partystate', partystatecode='$cstatecode', partygstno='$partygstno',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: supplier.php');

?>
