foreach ($airport_names as $airport_name) { if (isset($_GET['airport']) && $_GET['airport'] == $airport_name['airport_icao']) { print '<option value="' . $airport_name['airport_icao'] . '" selected="selected">' . $airport_name['airport_city'] . ', ' . $airport_name['airport_name'] . ', ' . $airport_name['airport_country'] . ' (' . $airport_name['airport_icao'] . ')</option>'; } else { print '<option value="' . $airport_name['airport_icao'] . '">' . $airport_name['airport_city'] . ', ' . $airport_name['airport_name'] . ', ' . $airport_name['airport_country'] . ' (' . $airport_name['airport_icao'] . ')</option>'; } } ?> </select> </div> <div class="form-group"> <label>Country</label> <select name="airport_country" class="selectpicker" data-live-search="true"> <option></option> <?php $airport_countries = $Spotter->getAllAirportCountries(); foreach ($airport_countries as $airport_country) { if (isset($_GET['airport_country']) && $_GET['airport_country'] == $airport_country['airport_country']) { print '<option value="' . $airport_country['airport_country'] . '" selected="selected">' . $airport_country['airport_country'] . '</option>'; } else { print '<option value="' . $airport_country['airport_country'] . '">' . $airport_country['airport_country'] . '</option>'; } } ?> </select> </div> </fieldset> <fieldset> <legend>Route</legend> <div class="form-group">
foreach ($airport_names as $airport_name) { if (isset($_GET['airport']) && $_GET['airport'] == $airport_name['airport_icao']) { print '<option value="' . $airport_name['airport_icao'] . '" selected="selected">' . $airport_name['airport_city'] . ', ' . $airport_name['airport_name'] . ', ' . $airport_name['airport_country'] . ' (' . $airport_name['airport_icao'] . ')</option>'; } else { print '<option value="' . $airport_name['airport_icao'] . '">' . $airport_name['airport_city'] . ', ' . $airport_name['airport_name'] . ', ' . $airport_name['airport_country'] . ' (' . $airport_name['airport_icao'] . ')</option>'; } } ?> </select> </div> <div class="form-group"> <label>Country</label> <select name="airport_country" class="selectpicker" data-live-search="true"> <option></option> <?php $airport_countries = Spotter::getAllAirportCountries(); foreach ($airport_countries as $airport_country) { if (isset($_GET['airport_country']) && $_GET['airport_country'] == $airport_country['airport_country']) { print '<option value="' . $airport_country['airport_country'] . '" selected="selected">' . $airport_country['airport_country'] . '</option>'; } else { print '<option value="' . $airport_country['airport_country'] . '">' . $airport_country['airport_country'] . '</option>'; } } ?> </select> </div> </fieldset> <fieldset> <legend>Route</legend> <div class="form-group">