Adding Pilot Hub to PIREP Submit Emails

I’m wanting to add the Pilot Hub of the Pilot to the email that staff get when a pilot submits a PIREP.  I have located the email code in PIREPData.class.php but I’m not sure how to get the hub info to show up.  I’ve tried several different things but my lack of PHP and database knowledge is definitely showing here.  :-)  Any help would be appreciated.

 

# Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by - {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message = "A PIREP has been submitted by {$pilotcode} " ."({$pilotinfo-\>firstname} {$pilotinfo-\>lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n" ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$comment}\n\n";

 

Have you tried $pilot->hub?

1 minute ago, servetas said:

Have you tried $pilot->hub?

It looks like it might actually be $pilotinfo->hub 

# Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by - {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message = "A PIREP has been submitted by {$pilotcode} " ."({$pilotinfo-\>firstname} {$pilotinfo-\>lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n" ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$comment}\n\n" ."Pilot's Hub: {$pilotinfo-\>hub}\n\n";

 

That’s correct! (y)

Thanks guys - that worked.  I got close to the above command but just not close enough.  :slight_smile:

1 Like