<?php
	session_start();

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

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

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

	$_SESSION['msg'] = "Record deleted successfully";
	
	if($_SESSION['frompage']== 'SMS')
	{
	header('Location: template.php');
	}else{
		header('Location: emailtemplate.php');
	}
	

?>