<?php
session_start(); 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
		return;
	}
	
	
	
	
	$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");
	include("connectp.php");
	date_default_timezone_set("Asia/Singapore");
	$mdate= date('Y-m-d H:i:s');
	$mdate1= date('Y-m-d');

	$partymid=(int)mysqli_real_escape_string($conn,$_POST['partymid']);
	$umid=$_SESSION['linkariseumid'];
	
	$inquirystatus=$_POST['istatus'];
	
	
	 $eve2 = "update res_party_master set partyinqstatus='$inquirystatus', partyupdatedon='$mdate', partyupdatedby='$umid' where partymid=$partymid";
	if ($conn->query($eve2) === TRUE)
	{
		
		$_SESSION['msg'] = "Inquiry Status changed";
	}
	else
	{
		$_SESSION['msg1']="Error";
	}
	
	header("Location: inquirystatus.php?id=$partymid");
?>	