<?php
session_start();
include('../include/connection.php');
include('../include/app_config.php');

$sql = "select photo,id from eventphoto where eventid=:id order by id DESC";
$q=$con->select_query($sql,array(':id'=>$_GET['id']));
foreach($q as $r)
{
    echo '<div class="col-md-2">
            <div class="photo-wrap event">
                <div class="event-overlay"><button class="btn btn-danger btn-sm" onclick="Delete('.$r['id'].')">Delete</button></div>
                <img src="'.UPLOADS_FOLDER.$r['photo'].'" class="thumbnail no-borders img-responsive" style="max-width:100%"/>
            </div>
         </div>';
}
?>