completelydeck Posted April 12, 2009 Report Share Posted April 12, 2009 Nabeel, I've tried looking and tried figuring out the API, tried reading PHP tutorials, to no avail. I don't have any idea how to simply pull a logged in user's data onto a webpage. A simple "hello world" would help me. The only thing I've been able to do is recall the pilot's ID by putting: <?php $pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); ?> in and then: <li><b>Your Callsign</b>: <?php echo $pilotid ?></li> I'm probably going about it all wrong but that works at least. I'm trying to find a way to pull up the total number of hours, latest flight they flew in a short format (such as "Your last flight: TXA1441 - KAUS - KDEN"). Thanks for the help Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 12, 2009 Administrators Report Share Posted April 12, 2009 All of the logged in user's info is under Auth::$userinfo Do a print_r on it, <?php print_r(Auth::$userinfo); echo Auth::$userinfo->firstname; echo Auth::$userinfo->totalhours; echo Auth::$userinfo->totalflights; ?> There's an API function for putting the latest pireps for a pilot. Your getpilotcode() code is correct Quote Link to comment Share on other sites More sharing options...
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.