In you “ACARSData.class.php” file add the following function:
public static function GetFlightData($flightnum) { $sql = "SELECT \* FROM phpvms\_acarsdata WHERE flightnum = "$flightnum"; return DB::get\_row($sql); }
Now in ACARS table the flight number is not separated meaning there is only one column for flight number containing flight code and flight number combined together. In order for the function above to work, the flight code and flight nuber must be combined into one variable then passed to the function. Try the following inside your while-loop: