<?php ob_start(); ?>
<?php
include "layouts/db_connect.php";
session_start('ERP');
		 if(isset($_SESSION['code'])) {
	  $code = $_SESSION['code'];
	  $scode = $_SESSION['code'];
	   $mfin = $_SESSION['mfin'];
		$staff = $_SESSION['name'];
		 $postt = $_SESSION['postt'];
	}
	
$fid = $_GET['fid'];
$sql = mysqli_query($conn, "select * from monuser where fid = '$fid'");
$row2 = mysqli_fetch_array($sql);
$roll = $row2['roll'];
$mfin = $row2['mfin'];
$cdate = date("d-m-Y H:i:s");

mysqli_query($conn, "DELETE FROM monroll where mfin='$mfin' && rno = '$roll'");						
mysqli_query($conn, "DELETE FROM monuser where fid = '$fid'");

echo "<script>alert('Cancelled successfully');window.location.href='monbillrep.php'</script><br>";

?>


