<?php
$userId = isset($_GET['admin_id']) && is_numeric($_GET['admin_id'])?trim($_GET['admin_id']):0;

if(isset($_POST['Submit'])) {
	$access_var = isset($_POST['chk_sub'])?implode($_POST['chk_sub'],','):'';
	mysqli_query($con, "UPDATE tbl_admin SET `access` = '".$access_var."' WHERE admin_id = '$userId' ");
	header('location:index.php?page=manage_admin');
}

$resAccess1 = mysqli_fetch_array(mysqli_query($con, "SELECT ad_username,access FROM tbl_admin WHERE admin_id = '".$userId."' LIMIT 1"));
$accessArray1 = explode(',',$resAccess1['access']);
?>