if ($referral->create($data) !== false) { $ref_2 = $referral->getId(); echo "This referral has an ID of <b>" . $ref_2 . "</b><br><br>"; } else { echo "failed"; exit; } ?> </p><p style="font-weight: bold;">Add another referral... </p><p><?php $data = array(); $data['member'] = $rid; $data['referee'] = $uid; $data['job'] = 161; $data['referred_on'] = now(); $testimony = array('Known member for 3 years.', 'Good in cartooning', 'Good people skills'); $data['testimony'] = Referral::serializeTestimony($testimony); if ($referral->create($data) !== false) { $ref_3 = $referral->getId(); echo "This referral has an ID of <b>" . $ref_3 . "</b><br><br>"; } else { echo "failed"; exit; } ?> </p><p style="font-weight: bold;">Show all referrals... </p><p><?php $criteria = array('columns' => '*', 'order' => 'referred_on DESC', 'limit' => '5'); print_array($referral->find($criteria)); ?> </p><p style="font-weight: bold;">Referee confirms for referral 3... </p><p><?php $referral = new Referral($ref_3); $data = array();