<?php
	session_start();

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

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

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

	
	$query1="delete from res_immigrationdocs_detail where imgmid=$imgmid";
	$result1= mysqli_query($conn, $query1) or die("Error");

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

?>