$userID = 0; if (isset($_COOKIE['userID'])) { $userID = $_COOKIE['userID']; } else { header("Location: /tick/login.html"); } $stageID = 0; if (isset($_COOKIE['stageID'])) { $stageID = $_COOKIE['stageID']; } else { header("Location: /tick/stages.php"); } $query = "SELECT events.name as event_name, stages.* FROM events, stages WHERE events.ID = stages.eventID AND stages.ID = $stageID AND events.userID = $userID"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { $event_name = $r['event_name']; $name = $r['name']; } mysql_free_result($result); } $query = "SELECT * FROM maps WHERE stageID = $stageID"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { $ID = $r['ID']; $zoom = $r['zoom']; $center_lat = $r['center_lat']; $center_lon = $r['center_lon']; $map_type = $r['map_type']; } mysql_free_result($result); } ?>