<?php require_once '../database_access.php'; //use session on this page if (!isset($_SESSION)) { session_start(); } if (isset($_GET["event_id"])) { $event_id = $_GET["event_id"]; } else { echo '<p class="error_message">Need an event ID</p>'; } //get event from event id $q = new EventQuery(); $event = $q->findPk($event_id); //get interests $interests = EventInterestQuery::create()->find(); //check if current user is interested in this event $interested = FALSE; foreach ($interests as $interest) { if ($interest->getInterestedUserID() == $_SESSION['uid']) { $interested = TRUE; } } ?> <!DOCTYPE HTML> <html> <head> <?php include_once '../basic_includes/sheets_and_scripts.php'; ?>