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?