Tylor Eddy Posted May 28, 2011 Report Share Posted May 28, 2011 G'day All, I'm having some trouble manipulating the code below to get it to display the pilots first name, rather than their ID <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); } ?> Some help would be great, i've tried a few times, and i just can't get it to work Cheers Tylor Quote Link to comment Share on other sites More sharing options...
James142 Posted May 28, 2011 Report Share Posted May 28, 2011 G'day All, I'm having some trouble manipulating the code below to get it to display the pilots first name, rather than their ID <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); } ?> Some help would be great, i've tried a few times, and i just can't get it to work Cheers Tylor Try <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname; } ?> Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted May 28, 2011 Author Report Share Posted May 28, 2011 Try <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname; } ?> After trying your code, i recieved this error Parse error: syntax error, unexpected ';' in /home/qantasvi/public_html/lib/skins/brilliancev1/layout.tpl on line 205 I was recieving this earlier, when i attempted to change it too. Cheers Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted May 28, 2011 Moderators Report Share Posted May 28, 2011 Try and get rid of the 2 ; and see what it does. Quote Link to comment Share on other sites More sharing options...
Strider Posted May 29, 2011 Report Share Posted May 29, 2011 <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname; } ?> the last part is missing a ) at the end. Here is the code with that included: <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname); } ?> Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 4, 2011 Author Report Share Posted June 4, 2011 <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname; } ?> the last part is missing a ) at the end. Here is the code with that included: <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.PilotData::GetPilotCode(Auth::$userinfo->firstname, $userinfo->lastname); } ?> G'day Guys, Thanks for the support, sorry for the delayed reply, my sites been down ,so i couldnt test this. I just tested in then and i get Hello Tylor 000. I'm not sure what the 000 is , but its nearly there, all im after is the first name, and its got that. It just has some numbers after it. Any idea's ? Thanks for the support While we are on the topic of pilot numbers, is it possible to pull the number and bot the full ID, so just the 000, not the whole QFA000 ? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted June 4, 2011 Report Share Posted June 4, 2011 Try this <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; } ?> Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 4, 2011 Author Report Share Posted June 4, 2011 Try this <?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; } ?> Thanks Very much guys, working great now. How do i mark this topic as solved ?, i am unfamiliar with this forum type. Cheers Tylor Quote Link to comment Share on other sites More sharing options...
James142 Posted June 5, 2011 Report Share Posted June 5, 2011 Thanks Very much guys, working great now. How do i mark this topic as solved ?, i am unfamiliar with this forum type. Cheers Tylor Go to your first post and edit < Use Full Editor. There you can edit the Title. James Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 5, 2011 Author Report Share Posted June 5, 2011 Go to your first post and edit < Use Full Editor. There you can edit the Title. James cheers 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.