<?php require_once('../auth/auth.php');
    ob_start();
        if (isset($_POST['psid'])) {
           $psid = $_POST['psid'];
           $col_name   = $_POST['col_name'];
           $col_value  = $_POST['col_value'];
           mysqli_query($conn,"UPDATE printer_setup SET $col_name='$col_value' WHERE psid='$psid' ")or die(mysqli_error($conn));
        }
    ob_end_clean();
    ?>


<?php 
ob_start();
        if (isset($_POST['cpid'])) {
           $cpid = $_POST['cpid'];
            $col_name   = $_POST['col_name'];
           $col_value  = $_POST['col_value'];
           mysqli_query($conn,"UPDATE custom_prefix SET $col_name='$col_value' WHERE cpid='$cpid'")or die(mysqli_error($conn));
        }
ob_end_clean();
?>

<?php
ob_start();
    if (isset($_POST['signed'])) {
        $dataurl = base64_encode(file_get_contents($_POST['signed']));
        mysqli_query($conn,"UPDATE company SET signature='$dataurl' WHERE coid='$coid'1") or die(mysqli_error($conn));
        echo "Signature Uploaded Successfully.";
    }
ob_end_clean();
?>