Jump to content

search form in frontpage_main


bass

Recommended Posts

Help bring the search form airports in frontpage_main

I 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="">&#1048;&#1050;&#1040;&#1054; &#1074;&#1099;&#1083;&#1077;&#1090;&#1072;</option>
        <?php
		if(!$depairports) $depairports = array();
			foreach($depairports as $airport)
			{
				echo '<option value="'.$airport->icao.'">'.$airport->icao
						.' ('.$airport->name.')</option>';
			}
		?>
        </select>

 

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...