<?php
error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATED);
session_start();
if($_SESSION['sml_si']!=session_id()) {
    die();
}
require_once("../../db/connection.php");
$id_map = (int)$_POST['id_map'];
$return = array();
$query = "SELECT * FROM sml_geoimages WHERE id_map=$id_map;";
$result = $mysqli->query($query);
if($result) {
    if($result->num_rows>0) {
        while($row=$result->fetch_array(MYSQLI_ASSOC)) {
            $return[] = $row;
        }
    }
}
echo json_encode(array("geoimages"=>$return));