<?php
require_once './config/database.php';

$val = $_POST['status'];

if (!is_null($val))
{
    mysql_query('UPDATE variables SET VALUE = '.$val.', CHANGED=1 WHERE NAME=\'STATUS\'');
    
    echo 'OK '.$_SESSION['status'];
}