# \[SOLVED\] Display Pilot First name, not ID

**URL:** <https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [May 28, 2011, 10:20am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788 "2011-05-28T10:20:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tylor\_Eddy](https://forum.phpvms.net/user_avatar/forum.phpvms.net/tylor_eddy/32/48_2.png) [@Tylor\_Eddy](https://forum.phpvms.net/u/Tylor_Eddy)\
**Post date:** [May 28, 2011, 10:20am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/1 "2011-05-28T10:20:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![James142](https://forum.phpvms.net/user_avatar/forum.phpvms.net/james142/32/92_2.png) [@James142](https://forum.phpvms.net/u/James142)\
**Post date:** [May 28, 2011, 10:32am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/2 "2011-05-28T10:32:29Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![Tylor\_Eddy](https://forum.phpvms.net/user_avatar/forum.phpvms.net/tylor_eddy/32/48_2.png) [@Tylor\_Eddy](https://forum.phpvms.net/u/Tylor_Eddy)\
**Post date:** [May 28, 2011, 11:52am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/3 "2011-05-28T11:52:09Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![mark1million](https://forum.phpvms.net/user_avatar/forum.phpvms.net/mark1million/32/15_2.png) [@mark1million](https://forum.phpvms.net/u/mark1million)\
**Post date:** [May 28, 2011, 12:46pm UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/4 "2011-05-28T12:46:44Z")

</div>

Try and get rid of the 2 ; and see what it does.

---

<div class="post-metadata">

**Author:** ![Strider](https://forum.phpvms.net/user_avatar/forum.phpvms.net/strider/32/17_2.png) [@Strider](https://forum.phpvms.net/u/Strider)\
**Post date:** [May 29, 2011, 11:56am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/5 "2011-05-29T11:56:03Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![Tylor\_Eddy](https://forum.phpvms.net/user_avatar/forum.phpvms.net/tylor_eddy/32/48_2.png) [@Tylor\_Eddy](https://forum.phpvms.net/u/Tylor_Eddy)\
**Post date:** [June 4, 2011, 7:49am UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/6 "2011-06-04T07:49:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tylor\_Eddy](https://forum.phpvms.net/user_avatar/forum.phpvms.net/tylor_eddy/32/48_2.png) [@Tylor\_Eddy](https://forum.phpvms.net/u/Tylor_Eddy)\
**Post date:** [June 4, 2011, 11:32pm UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/7 "2011-06-04T23:32:08Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![James142](https://forum.phpvms.net/user_avatar/forum.phpvms.net/james142/32/92_2.png) [@James142](https://forum.phpvms.net/u/James142)\
**Post date:** [June 5, 2011, 2:32pm UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/8 "2011-06-05T14:32:32Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Tylor\_Eddy](https://forum.phpvms.net/user_avatar/forum.phpvms.net/tylor_eddy/32/48_2.png) [@Tylor\_Eddy](https://forum.phpvms.net/u/Tylor_Eddy)\
**Post date:** [June 5, 2011, 10:02pm UTC](https://forum.phpvms.net/t/solved-display-pilot-first-name-not-id/4788/9 "2011-06-05T22:02:27Z")

</div>

> Go to your first post and edit \< Use Full Editor. There you can edit the Title.
> 
> James

cheers
