<?php 
include("lib/Config.php");
	$sid=$_POST['sid'];
	$table=$_POST['tab'];
	$status=$_POST['status'];
	   if($status == 'Active'){$newstatus='0';}else{$newstatus='1';}
	   $arr=array('status' 			=>$newstatus);
		 $DB->update($table,$arr,"id='$sid'");
		 if($newstatus==0){echo 'Inactive';}else if($newstatus==1){echo 'Active';}
	?>