<?php

    require("../authenticate.php");
    require("../pagecomponents.php");

    check_auth();

    $tableName = getuserdata('tableName', '');
    $keyField = getuserdata('keyField', '');
    $keyValue = getuserdata('keyValue', '');
    $valueField = getuserdata('valueField', '');
    $value = getuserdata('value', '');
    
    $errorMessage = "";

    $q = mysql_query("UPDATE $tableName SET $valueField = $value WHERE $keyField = '$keyValue'");

    echo mysql_error();
?>