Jump to content

Display Live ACARS data for a specific flight number


Kishshey

Recommended Posts

Hello,

I need to create a page that will show the live flight information with the ACARS data, for a specific Flight Number

I also need the ability to GET the flight number from the url (test.php?flightnum=1533)

Can anyone give me a push in the right direction for this. I'd appreciate it a lot.

Thank you,

Kishshey

Link to comment
Share on other sites

  • Moderators

Inside your module function create a variable to get the number from url passed through submission of the form.

public function whatever()
{
 $var = $_GET['name of the form'];
}

Then use your variable to pass it to ACARS DATA matching the flight number

$sql="SELECT * FROM phpvms_acarsdata WHERE flightnumber = '$var'";
$flight =  DB::get_row($sql);

Then use $flight to show the columns

<table>
  <tr>
  <td>Flight Number</td>
  <td><?php echo $flight->flightnumber ;?></td>
  </tr>
</table>

Edited by parkho
Link to comment
Share on other sites

  • 3 weeks later...

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