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
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; } ?>
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
Try and get rid of the 2 ; and see what it does.
<?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); } ?>
<?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 ?
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
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