<?php
$username="admin";
$password="admin";
$database="smarthome";
$host="127.0.0.1";
$table = "control";
$con = mysql_connect($host,$username,$password);
mysql_select_db($database,$con) or die( "Unable to select database");
//$query = "INSERT INTO test VALUES ('Smith','John','')";
$query = "SELECT status FROM $table ";
$result = "UPDATE $table SET
status = '$variable1'
status = '$variable2'
status = '$variable3'
status = '$variable4'
WHERE ID = '$id'";
mysql_query($query) or die( "death to query" );
mysql_close($con);
echo "OK";
?>