<?php
	session_start();

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

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

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

	

	

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

?>