<?
session_start();
include_once('opendb.php');
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
//$br=$_SESSION['branch'];
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='inde.php' </script>";
  return;
}
$code=$_REQUEST['code'];
$sql="delete from unit where agrp='$code'";
echo $sql;
exit;
mysqli_query($db,"delete from unit where agrp='$code'")or die(mysqli_error($db));
print "<script> document.location='unit.php'; </script>";
?>
