Jump to content

Recommended Posts

Posted

Hello,

I am looking to put a flight booking on the layout using simpilots module however it dosnt reflect the airports, how can I get it to read the airports from the database like it does on its standard page?

Thanks

Jacob

Posted

Im using this on layout.tpl

<form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data">

<table style="border-collapse:collapse; " cellspacing="0" cellpadding="0" height="100%" width="100%" >

<tr>

<td>

<select style="margin-bottom:5px;" class="search" name="depicao">

<option value="">Select Departure</option>

<?php

foreach ($airports as $airport)

{echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';}

?>

</select>

</td><td rowspan="2" >

<input type="hidden" name="action" value="findflight" />

<input type="submit" name="submit" id="submit" value="Search" style="float:right; margin-right:5px;"/>

</td>

</tr>

<tr>

<td >

<select class="search" name="arricao">

<option value="">Select Arrival</option>

<?php

foreach ($airports as $airport)

{echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';}

?>

</select>

</td>

</tr>

</table>

</form>

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...