<?php
include "../config.php";
error_reporting(0);
$username=$_POST['usercode'];
$filename=$_POST['filename'];
$colname= $_POST['colname'];
$del=$_POST['unchk'];
echo $username;
echo $filename;
echo $colname;
echo $del;
if($del !='no')
{
    $quer="update userpermission set $colname='1' where employeecode = '$username' and filename='$filename'";
 
}
else
{
    $quer="update userpermission set $colname='' where employeecode = '$username' and filename='$filename'";

}
$go =mysqli_query($connect,$quer);
 echo $quer;
?>