<?php

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

foreach ($_POST as $paramName => $paramValue) {
  if ($paramName == "selectid")
    $oc_id = $paramValue;
}

$dal = new DAL();

$sql = "SELECT OZ.name " .
       "FROM organization OZ, organizationcontact OC " .
       "WHERE OC.id = $oc_id AND OC.organization_id = OZ.id LIMIT 1";
$organization = $dal->query($sql)->name;

echo json_encode($organization);

?>

