Jump to content

Current Location Problems


Dyl1103

Recommended Posts

Hello all! Having an issue where I'm trying to display a pilots current location based on their last PIREP, however on any page that calls for the location from their last PIREP, it still displays their hub. For example, on my profile page I'm using:

 

<?php
$lastreport = PIREPData::GetLastReports($userinfo, 1);

if(!$lastreport)
{
    $location = $userinfo->hub;
}
else
{
    $location = $lastreport->arricao;
}

?>
<?php
$airport_info = OperationsData::GetAirportInfo($location);

   $airportname = $airport_info->name;
?>

<li><strong>Current Location: </strong><?php echo $location; ?> - <?php echo $airportname; ?></li>

 

this is the output (still gotta tweak some styling): https://prnt.sc/1dxsxk4

 

I guess I know it's talking to the database, cause its displaying the proper hub per pilot...but I'm lost on it actually showing the location based on their last PIREP.... any thoughts?

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