


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

?>



