Yup, you're on your way Mitchell... that $pirepdata array is this:
$data = array(
'pilotid' => $pilotid,
'code' => $code,
'flightnum' => $flightnum,
'depicao' => $_GET['origin'],
'arricao' => $_GET['dest'],
'aircraft' => $ac->id,
'flighttime' => $flighttime,
'landingrate' => $landingrate,
'submitdate' => 'NOW()',
'comment' => $comment,
'fuelused' => $_GET['fuel'],
'source' => 'fsacars',
'load' => $load,
'rawdata' => $log,
'log'=> $_GET['log']
);
The pilotid is the numeric ID. The aircraft is the numeric ID. the Comment is optional