<?php
// include database and object files
include_once '../config/init.php';	// contains $db
include_once '../config/error.php';
include_once '../objects/stats_object.php';

$sessionId = isset($_POST['sessionId']) ? $_POST['sessionId'] : -1;

$stats = new StatsObject($db);
$stats->getUsersInSession($sessionId);

$stats_arr = $stats->getResultArray(true, "Session_Users_List_OK");
print_r(json_encode($stats_arr));	// OK
?>