/*set properties for the Secondary School details*/
    $school->school_name = $_POST[$name];
    $school->school_address = $_POST[$address];
    $school->from_year = $_POST[$from_y];
    $school->to_year = $_POST[$to_y];
    if ($school->school_name == '') {
        continue;
    }
    /*obatin applicant id from session*/
    $school->applicant_id = $session->applicant_id;
    /*obtain $_POST[$high_id] if it is set and not empty*/
    if (isset($_POST[$sch_id]) && !empty($_POST[$sch_id])) {
        $school->school_id = $_POST[$sch_id];
    }
    /*insert new record or update existing record in the Secondary School table*/
    if (!$school->save()) {
        $error_secondary_school = true;
    }
    $school->school_id = null;
}
/*Update Awards and Prizes*/
$user = new User();
$user->db_fields = array('academic_prizes');
$award_record = array();
/*loop for number of Awards and Prizes rows*/
for ($a = 1; $a < $_POST['num_of_award_rows']; $a++) {
    $prize = 'academic_prize_' . $a;
    $award_body = 'awarding_body_' . $a;
    $year = 'award_year_' . $a;
    if ($_POST[$prize] == '') {
        continue;