<?php
	session_start();

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

	include("connect.php");
	
	$partymid=(int)mysqli_real_escape_string($conn,$_GET['id']);

	
	$eve="delete from res_followup_detail where partymid=$partymid";
	$re = mysqli_query($conn, $eve);
	
	$query="delete from res_party_master where partymid=$partymid";
	$result= mysqli_query($conn, $query) or die("Error");

	$_SESSION['msg'] = "Record deleted successfully";
	header('Location: inquiry.php');
?>