<?php

include '../includes/connection.php';

$roleid = $_GET['id'];
$column = $_GET['column'];
$status = $_GET['status'];
$sql=mysqli_query($conn, "UPDATE permissions SET ".$column." = '$status' WHERE role_id='$roleid'");
if ($sql) {
	echo $column." updated to ".$status;
}else{
	echo "Error updating ".mysqli_error($conn);
}

?>