<?php

	require_once 'dbconfig.php';
	
	if(isset($_GET['agid']))
	{

		$stmt_delete = $DB_con->prepare('DELETE FROM mobileagency WHERE agid =:agid');
		$stmt_delete->bindParam(':agid',$_GET['agid']);
		$stmt_delete->execute();

		echo"<script type='text/javascript'>window.location.href = 'agencylist.php';</script>";
		
	}

?>