# How to know how many miles flown by the pilot

**URL:** <https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [October 13, 2010, 3:13am UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499 "2010-10-13T03:13:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kairon](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/k/74df32/32.png) [@Kairon](https://forum.phpvms.net/u/Kairon)\
**Post date:** [October 13, 2010, 3:13am UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/1 "2010-10-13T03:13:05Z")

</div>

Hello I wonder if you can have the information of total miles flown by a pilot to put in the Pilot Center.

---

<div class="post-metadata">

**Author:** ![Kairon](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/k/74df32/32.png) [@Kairon](https://forum.phpvms.net/u/Kairon)\
**Post date:** [October 14, 2010, 1:57am UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/2 "2010-10-14T01:57:29Z")

</div>

Help!!

---

<div class="post-metadata">

**Author:** ![Jeff](https://forum.phpvms.net/user_avatar/forum.phpvms.net/jeff/32/78_2.png) [@Jeff](https://forum.phpvms.net/u/Jeff)\
**Post date:** [September 9, 2011, 5:48am UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/3 "2011-09-09T05:48:33Z")

</div>

[bump]

---

<div class="post-metadata">

**Author:** ![Jeff](https://forum.phpvms.net/user_avatar/forum.phpvms.net/jeff/32/78_2.png) [@Jeff](https://forum.phpvms.net/u/Jeff)\
**Post date:** [September 9, 2011, 2:48pm UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/4 "2011-09-09T14:48:32Z")

</div>

I’m trying to place the code to have it show in the profile\_main.tpl with the rest of the pilot information about the member. I am trying to figure out which call to use for it.

This isn’t working:

```
<li><strong>Miles Flown: </strong><?php echo $userinfo->totalmiles; ?></li>

```

I’m sure the code you just gave, goes in the PilotData.php, but trying to figure the pull code.

---

<div class="post-metadata">

**Author:** ![Jeff](https://forum.phpvms.net/user_avatar/forum.phpvms.net/jeff/32/78_2.png) [@Jeff](https://forum.phpvms.net/u/Jeff)\
**Post date:** [September 9, 2011, 4:41pm UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/5 "2011-09-09T16:41:16Z")

</div>

Actually you did a great job on it. It works perfectly now. Thanks a lot on the help.

Other interested parties wondering how to do it, follow Jeffrey’s examples then in the profile\_main.tpl place this in the lineup:

```
<li><?php
$custom_info = CUSTOMData::getPilotInfoWithTotalDistance($userinfo->pilotid);
echo '<strong>Total Flown Miles: </strong>'.$custom_info->totalmiles;
?></li>

```

The same exact code above will also work in the pilot\_public\_profile.tpl without any modifications.

---

<div class="post-metadata">

**Author:** ![AGuyFawkesMask](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@AGuyFawkesMask](https://forum.phpvms.net/u/AGuyFawkesMask)\
**Post date:** [January 26, 2012, 6:52pm UTC](https://forum.phpvms.net/t/how-to-know-how-many-miles-flown-by-the-pilot/3499/6 "2012-01-26T18:52:17Z")

</div>

Sorry to bump this, but you did a great job with this, Jeffery. Really helps me out a lot, too.

Thanks.
