$high_inst->year_of_attendance = $_POST[$from];
    $high_inst->graduation_year = $_POST[$to];
    $high_inst->degree_earned = $_POST[$degree];
    $high_inst->cgpa = $_POST[$cpga];
    $high_inst->course_of_study = $_POST[$course];
    if ($high_inst->institution_name == '') {
        continue;
    }
    /*obatin applicant id from session*/
    $high_inst->applicant_id = $session->applicant_id;
    /*obtain $_POST[$high_id] if it is set and not empty*/
    if (isset($_POST[$high_id]) && !empty($_POST[$high_id])) {
        $high_inst->high_id = $_POST[$high_id];
    }
    /*insert new record or update existing record in the higher_institution table*/
    if (!$high_inst->save()) {
        $error_higher_institution = true;
    }
    $high_inst->high_id = null;
}
/*Update Other Qualifications*/
$qualification = new Qualifications();
$qualification->db_fields = array('other_qualifications_id', 'applicant_id', 'name_of_institutions', 'from_year', 'to_year', 'certificate_qualification_name', 'grade');
/*loop for number of Other Qualifications rows*/
for ($j = 1; $j < $_POST['num_of_o_qualification_rows']; $j++) {
    $name_of_insti = 'other_qualification_institute_name_' . $j;
    $from = 'other_qualification_from_' . $j;
    $to = 'other_qualification_to_' . $j;
    $certificate = 'other_qualification_certificate_' . $j;
    $grade = 'other_qualification_grade_' . $j;
    $qual_id = 'qual_id_' . $j;