<?php
	session_start();

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

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

	
																		 
	
	$query="delete from res_batchallocation_detail where badid =$badid ";
	$result= mysqli_query($conn, $query) or die("Error1");
$query1="delete from res_attendence_detail where badid =$badid ";
	$result1= mysqli_query($conn, $query1) or die("Error");

	

	

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

?>