<?php
if (isset($_POST["Field_Name"]) && isset($_POST["Field_Value"]) && isset($_POST["comp_id"])) {
    $fldName = $_POST["Field_Name"];
    $fldValue = $_POST["Field_Value"];
    $CompID = $_POST["comp_id"];
    $sql = "UPDATE company SET $fldName=" . $fldValue . " WHERE comp_id=" . $CompID;
    include_once('opendb.php');
    if ($conn->query($sql) === TRUE) {         
        echo("Updated");
    } else {
        echo("Error in updation");
    }
     $conn->close();
} else {
    echo "Parameters missing". $_POST["Field_Name"]. " " .$_POST["Field_Value"]. " ". $_POST["comp_id"] ;
}