


<?php 
include('dbcon.php');
$j =$_GET['cat_id'];
$status=$_GET['status'];
$value='Deactive';
if($status=='Deactive')
{
	$value='Active';
}
$qry=mysqli_query($con,"UPDATE tbl_submenu  SET status='".$value."' WHERE submenu_id='".$j."'");
if($qry==true)
{
	echo"<script>alert('Status updated');</script>";
	header('location:cat_detail.php');
}
else
{
	echo "<script>alert('Status not updated..');</script>";
}

?>

<?php 
include('dbcon.php');
$j =$_GET['pro_id'];
$status=$_GET['status'];
$value='Deactive';
if($status=='Deactive')
{
	$value='Active';
}
$qry=mysqli_query($con,"UPDATE tbl_submenu SET status='".$value."' WHERE submenu_id='".$j."'");
if($qry==true)
{
	echo"<script>alert('Status updated');window.location.href='submenu_detail.php';</script>";
	//header('location:product_detail.php');
}
else
{
	echo "<script>alert('Status not updated..');</script>";
}

?>





