Jump to content

[SOLVED] Display Pilot First name, not ID


Tylor Eddy

Recommended Posts

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

Link to comment
Share on other sites

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; } ?>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

<?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); } ?>

Link to comment
Share on other sites

<?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 ?

Link to comment
Share on other sites

Guest lorathon

Try this

<?php if(Auth::LoggedIn() == false){ echo 'Hello Guest'; }else{ echo 'Hello '.Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; } ?>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...