<?php
	session_start();

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

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

	
	
	$query="delete from res_offer_master where offermid=$offermid";
	$result= mysqli_query($conn, $query) or die("Error");

	$query="delete from res_offersubservice_detail where offermid=$offermid";
	$result= mysqli_query($conn, $query) or die("Error");

	$query="delete from res_offercountry_detail where offermid=$offermid";
	$result= mysqli_query($conn, $query) or die("Error");

	$query="delete from res_offerbranch_detail where offermid=$offermid";
	$result= mysqli_query($conn, $query) or die("Error");

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

?>