# Help With PIREP Submitting

**URL:** <https://forum.phpvms.net/t/help-with-pirep-submitting/11256>\
**Category:** Code Snippets\
**Created:** [August 21, 2016, 10:48pm UTC](https://forum.phpvms.net/t/help-with-pirep-submitting/11256 "2016-08-21T22:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lancaster123](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lancaster123](https://forum.phpvms.net/u/lancaster123)\
**Post date:** [August 21, 2016, 10:48pm UTC](https://forum.phpvms.net/t/help-with-pirep-submitting/11256/1 "2016-08-21T22:48:30Z")

</div>

Hi Guys,

What im trying to do is when a manual PIREP is submitted on my website I need the arricao to go into a custom field in my aircraft table called location. I have tried changing this section in PIREPData.class.php but it don’t work:

```
$sql = "INSERT INTO ".TABLE_PREFIX."pireps(
 `pilotid`,
 `code`,
 `flightnum`,
 `depicao`,
 `arricao`,
`location`,
 `route`,
 `route_details`,
 `distance`,
 `aircraft`,
 `flighttime`,
 `flighttime_stamp`,
 `landingrate`,
 `submitdate`,
 `accepted`,
 `log`,
 `load`,
 `fuelused`,
 `expenselist`,
 `source`,
 `pob`,
 `exported`,
 `rawdata`)
 VALUES ( {$pirepdata['pilotid']},
 '{$pirepdata['code']}',
 '{$pirepdata['flightnum']}',
 '{$pirepdata['depicao']}',
 '{$pirepdata['arricao']}',
'{$pirepdata['arricao']}',
 '{$pirepdata['route']}',
 '{$pirepdata['route_details']}',
 '{$pirepdata['distance']}',
 '{$pirepdata['aircraft']}',
 '{$pirepdata['flighttime']}',
 '{$flighttime_stamp}',
 '{$pirepdata['landingrate']}',
 NOW(),
 ".PIREP_PENDING.",
 '{$pirepdata['log']}',
 '{$pirepdata['load']}',
 '{$pirepdata['fuelused']}',
 '0',
 '{$pirepdata['source']}',
 '{$pirepdata['pob']}',
 {$pirepdata['exported']},
 '{$pirepdata['rawdata']}')";

```

Any Ideas how to simply put the arricao in the arricao field and in my extra location field in my SQL table?

Many Thanks

Scott

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [August 22, 2016, 1:08am UTC](https://forum.phpvms.net/t/help-with-pirep-submitting/11256/2 "2016-08-22T01:08:06Z")

</div>

Looking at the insert on the surface it seems like it should work. Is the spelling of the column name not the same in the table as in the code possibly? Is the pirep not submitting at all, or is it just missing that field when it submits?
