bass Posted January 20, 2017 Report Share Posted January 20, 2017 Help bring the search form airports in frontpage_mainI put this code, but the data from the database are not displayed. <select type="text" name="a" class="input-text full-width" placeholder="Введите код годода отправления" /> <option value="">ИКАО вылета</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> Quote Link to comment Share on other sites More sharing options...
web541 Posted January 20, 2017 Report Share Posted January 20, 2017 Try this <select type="text" name="a" class="input-text full-width" placeholder="Введите код годода отправления" /> <option value="">Select Airports</option> <?php $depairports = OperationsData::getAllAirports(); if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao.' ('.$airport->name.')</option>'; } ?> </select> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.