<?php
	include'connection.php';
	$uid=$_GET['id'];
	$sub=substr($uid,"0","1");
	if($sub==3)
	{
		$mquery="update masterdis set Active=1 where Userid=$uid";
		mysqli_query($con,$mquery);
		header('location:view_md.php');
	}
	elseif($sub==2)
	{
		$dquery="update distributer set Active=1 where Userid=$uid";
		mysqli_query($con,$dquery);
		header('location:view_distributer.php');
	}
	else
	{
		$rquery="update retailer set Active=1 where Userid=$uid";
		mysqli_query($con,$rquery);
		header('location:view_retailer.php');
	}

?>