<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');

foreach ($_POST as $paramName => $paramValue) {
  if ($paramName == "table")
    $table = $paramValue;
  elseif ($paramName == "column") 
    $column = $paramValue;  
}

$dal = new DAL();
$sql = "SELECT DISTINCT $column FROM $table " ;
$result = $dal->query($sql);

echo json_encode($result);

?>

