<?php
include_once("../class/class.MySQL.php");
$db	=new MySQL();
$action = $_GET['act'];

$userid		= $_GET['userid'];

if($action == "update")
{
$arrys = join(',',$_POST['checkadd']); 
	$data['desig_name']	 = $_POST['designationame'];
	$data['departs_id']	 = $_POST['department_name'];
	$data['depart_sub_name']	 = $_POST['sub_department'];
	$data['depart_rank']	 = $_POST['department_rank'];
	$data['desig_rights']=$arrys;
	$where['desig_id']	 = $_POST['userid'];
	$db->Update('designation',$data,$where);
	echo json_encode($data);
	
	
	
}


?>