$cards = new MemberCardsModel($dbc); $cards->card_no($memNum); $cards->upc($_REQUEST['cardUPC']); $cards->save(); $mcP = $sql->prepare("UPDATE memContact SET pref=? WHERE card_no=?"); $sql->execute($mcP, array($MI_FIELDS['ads_OK'], $memNum)); if ($cust->memType() == 1 || $cust->memType() == 3) { $cust->Type('PC'); } if ($cust->memType() == 3 || $cust->memType() == 9) { $cust->Discount(12); $cust->Staff(1); } $cust->FirstName($_POST['fName']); $cust->LastName($_POST['lName']); $cust->BlueLine($cust->CardNo() . ' ' . $cust->LastName()); $cust->save(); // save personNum=1 $lnames = $_REQUEST['hhLname']; $fnames = $_REQUEST['hhFname']; $count = 2; for ($i = 0; $i < count($lnames); $i++) { if (empty($lnames[$i]) && empty($fnames[$i])) { continue; } $cust->personNum($count); $cust->FirstName($fnames[$i]); $cust->LastName($lnames[$i]); $cust->BlueLine($cust->CardNo() . ' ' . $cust->LastName()); $cust->save(); // save next personNum