<?php

include "../../root.class.php";
$db = new db_safeguard();
$column_name = $_POST['column_name'];
$value = $_POST['value'];
$record_id = $_POST['record_id'];

if (
    $db->query("sites", "UPDATE `sites` SET `$column_name` = '$value' WHERE `record_id` = '$record_id'")
) {
    echo 1;
} else {
    echo 0;
}