TennShadow Posted March 5, 2017 Report Posted March 5, 2017 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"; Quote
Moderators servetas Posted March 5, 2017 Moderators Report Posted March 5, 2017 Have you tried $pilot->hub? Quote
web541 Posted March 5, 2017 Report Posted March 5, 2017 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"; Quote
Moderators servetas Posted March 5, 2017 Moderators Report Posted March 5, 2017 That's correct! (y) Quote
TennShadow Posted March 12, 2017 Author Report Posted March 12, 2017 Thanks guys - that worked. I got close to the above command but just not close enough. :-) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.