<?php
	session_start();

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

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

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

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

?>