<?php
include "header.php";
if (power_chk('', 1)) {
    $myts = MyTextSanitizer::getInstance();
    $id = $myts->htmlSpecialChars($_POST['id']);
    $value = $myts->htmlSpecialChars($_POST['value']);
    $sn=(int) $_POST['sn'];
    $sql = "update " . $xoopsDB->prefix("snews") . " set `{$id}`='{$value}' where sn='{$sn}'";
    $xoopsDB->queryF($sql);
    echo $value;
}