<?php    
ob_start();
include("connect.php");
session_start();
$ver = $_SESSION["user_id"];
$ver = $_SESSION['distributor_user_id'];
$user_role= $_SESSION['user_role'];
$id1=$_GET['id']; 
$res = mysqli_query($con,"select * from tbl_master_product where product_id='$id1'");
$ver1 = mysqli_fetch_assoc($res);
$delete_status=$ver1['status'];

if($delete_status=='Active')
{
	$uq1=mysqli_query($con,"UPDATE tbl_master_product SET status='Deactive' where product_id='$id1'");
}
if($delete_status=='Deactive')
{
	$uq1=mysqli_query($con,"UPDATE tbl_master_product SET status='Active' where product_id='$id1'");
}
if($uq1){ header('Location:product_detail.php'); }
 ?>