<?php

	require_once 'dbconfig.php';
	
	if(isset($_GET['unit_id']))
	{
		
		$stmt_delete = $DB_con->prepare('DELETE FROM unit WHERE unit_id =:unit_id');
		$stmt_delete->bindParam(':unit_id',$_GET['unit_id']);
		$stmt_delete->execute();
		
		//header("Location: category.php");
		echo"<script type='text/javascript'>window.location.href = 'unitlist.php';</script>";
		
	}

?>