<?php
	session_start();

	if(!isset($_SESSION['linkarisesuloginsesion']))
	{
		header('Location: index.php');
		return;
	}
	if($_SESSION['linkariseutype']!='Superuser'){
			header('Location: index.php');
		return;
	}
	$brmobile=$_POST['brmobile'];
	$brmid=$_POST['brmid'];
	$muusername=$_POST['muusername'];

	include("connect.php");
	$eve = "select * from res_businessregister_master where brmid='$brmid' and brmobile='$brmobile'";
	$re = mysqli_query($conn, $eve);
	if(mysqli_num_rows($re) > 0)
	{
					
		$query="delete from res_businessregister_master where brmid=$brmid";
		$result= mysqli_query($conn, $query);
		$query1="delete from res_user_master where brmid=$brmid";
		$result1= mysqli_query($conn, $query1);	
	
		$_SESSION['msg'] = "Record deleted successfully";

	}
	else{
		$_SESSION['msg1'] = "Error";
	}
	header('Location: businessregister.php');
	
?>