<?php
	session_start();

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

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

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

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

	

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

?>