# Custom field data

**URL:** <https://forum.phpvms.net/t/custom-field-data/2699>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [May 22, 2010, 7:58am UTC](https://forum.phpvms.net/t/custom-field-data/2699 "2010-05-22T07:58:16Z")\
**Posts on this page:** 13\
**Page:** 1

<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 22, 2010, 7:58am UTC](https://forum.phpvms.net/t/custom-field-data/2699/1 "2010-05-22T07:58:16Z")

</div>

Hi Nabeel,

I have created a custom field when registering “vatsimid” i want to pull all that field values in to a plain text web page, i thought the values would have been in the pilots table but the’re not, i have had a poke about but any assistance would be appreciated.

This is what i want,

\<?php echo PilotData::GetFieldValue($pilot-\>pilotid, ‘VATSIM ID’); ?\>

Just a plain text file with all the CID’s

---

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [May 22, 2010, 3:20pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/2 "2010-05-22T15:20:14Z")

</div>

Something like:

```
$allpilots = PilotData::getAllPilots(); # I believe that's the right function
foreach($allpilots as $pilot) 
{
echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
}

```

---

<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 22, 2010, 4:35pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/3 "2010-05-22T16:35:59Z")

</div>

I get the following error,

Fatal error: Class ‘PilotData’ not found in /srv/www/easyjetva.com/public\_html/core/vr.php on line 2

what im afer is that fied data in a plain text file for vroute to automatically parse my roster with vatsim id’s and send invitations to join the group.

---

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [May 22, 2010, 4:56pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/4 "2010-05-22T16:56:54Z")

</div>

Did you include the codon.config.php file?

---

<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 22, 2010, 6:44pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/5 "2010-05-22T18:44:09Z")

</div>

OK so the plot thickens, thats got rid of the error but nothing is displayed for some reason.

---

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [May 22, 2010, 6:53pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/6 "2010-05-22T18:53:30Z")

</div>

Sounds like there’s an error somewhere then, try adding, below the include:

```
error_reporting(E_ALL);
ini_set('display_errors', 'on');

```

---

<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 22, 2010, 6:56pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/7 "2010-05-22T18:56:55Z")

</div>

Tried that im getting no output what so ever, Damn..

---

<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 22, 2010, 7:00pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/8 "2010-05-22T19:00:46Z")

</div>

OK so i had to put the actual file location not the url which is now working but im getting the complete data in one line, is there a way i can put in a line break?

---

<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 22, 2010, 7:09pm UTC](https://forum.phpvms.net/t/custom-field-data/2699/9 "2010-05-22T19:09:56Z")

</div>

No worries i figured it out, Thanks Nabeel for your help.

---

<div class="post-metadata">

**Author:** ![Jon](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@Jon](https://forum.phpvms.net/u/Jon)\
**Post date:** [November 20, 2010, 8:54am UTC](https://forum.phpvms.net/t/custom-field-data/2699/10 "2010-11-20T08:54:46Z")

</div>

Hi Mark,

Did you get the code for auto-vroute invites working?

If yes can I have it please

Regards

Jon

---

<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:** [November 20, 2010, 10:03am UTC](https://forum.phpvms.net/t/custom-field-data/2699/11 "2010-11-20T10:03:57Z")

</div>

Hi Jon,

Yes is did, you will need to speak with Michal Rok before hand and he will set you up on his side that will look at that file and parse it.

In another VA i am involved with they use an api in to vroute that will provide a route based on the variables passed dep and arr, but i just have not had the time to look in to that yet

---

<div class="post-metadata">

**Author:** ![Jon](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@Jon](https://forum.phpvms.net/u/Jon)\
**Post date:** [November 20, 2010, 11:29am UTC](https://forum.phpvms.net/t/custom-field-data/2699/12 "2010-11-20T11:29:11Z")

</div>

Hi Mark,

Ok Thanks For That,

Kind Regards

Jon Derrick

---

<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:** [November 20, 2010, 11:42am UTC](https://forum.phpvms.net/t/custom-field-data/2699/13 "2010-11-20T11:42:47Z")

</div>

Sorry Jon was going to post the file but got distracted in something else

Here you go, just change the field value for your custom created field and it will pull what ever you like, as you can see this is outside of phpvms and site in the root folder.

Just make sure you define your actual path of the file in the include and yes it does need the //

```
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 'on');
include 'YOURSITES_ROOT_PATH/public_html//core/codon.config.php';
$allpilots = PilotData::getAllPilots();
foreach($allpilots as $pilot)
{
       echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
echo '<br />';
}
?>

```
