$discovery->referrals = $_POST['e_referrals'];
        $discovery->others = $_POST['e_others'];
        $discovery->update();
        //----------------------------------------------------------------------------------------------------------------------------------//
        $enrollmentDetail = EnrollmentDetail::get_by_id($student->enrollment_detail_id);
        $enrollmentDetail->status = $_POST['f_status'];
        $enrollmentDetail->program = $_POST['f_program'];
        $enrollmentDetail->schedule = $_POST['f_schedule'];
        $enrollmentDetail->payment = $_POST['f_payment'];
        $enrollmentDetail->studentcontactnumber = $_POST['f_studentcontactnumber'];
        $enrollmentDetail->update();
        //----------------------------------------------------------------------------------------------------------------------------------//
        $appointmentDetail = AppointmentDetail::get_by_id($student->appointment_detail_id);
        $appointmentDetail->visitschedule = strtotime($_POST['g_visitschedule']);
        $appointmentDetail->visitpurpose = $_POST['g_visitpurpose'];
        $appointmentDetail->officer = $_POST['g_officer'];
        $appointmentDetail->update();
        //----------------------------------------------------------------------------------------------------------------------------------//
    } else {
        if ($_POST['oper'] == 'del') {
            $student = Student::get_by_id($_POST['id']);
            $student->delete();
            AppointmentDetail::get_by_id($student->appointment_detail_id)->delete();
            EnrollmentDetail::get_by_id($student->enrollment_detail_id)->delete();
            StiDiscovery::get_by_id($student->sti_discovery_id)->delete();
            SchoolConsidered::get_by_id($student->school_considered_id)->delete();
            SchoolLastAttended::get_by_id($student->school_last_attended_id)->delete();
            PersonalInformation::get_by_id($student->personal_information_id)->delete();
        }
    }
}
 $s .= "<cell>" . $personInfo->middlename . "</cell>";
 $s .= "<cell>" . $personInfo->address . "</cell>";
 $s .= "<cell>" . $personInfo->father . "</cell>";
 $s .= "<cell>" . $personInfo->mother . "</cell>";
 $s .= "<cell>" . $personInfo->guardian . "</cell>";
 $s .= "<cell>" . $personInfo->gender . "</cell>";
 $s .= "<cell>" . $personInfo->civilstatus . "</cell>";
 $s .= "<cell>" . $personInfo->citizenship . "</cell>";
 $s .= "<cell>" . $personInfo->birthday . "</cell>";
 $s .= "<cell>" . $personInfo->email . "</cell>";
 $s .= "<cell>" . $personInfo->contactnumber1 . "</cell>";
 $s .= "<cell>" . $personInfo->contactnumber2 . "</cell>";
 $s .= "<cell>" . $personInfo->contactnumber3 . "</cell>";
 $s .= "<cell>" . $personInfo->emergencycontactperson . "</cell>";
 //----------------------------------------------------------------------------------------------------------------------------------//
 $schoolLastAttended = SchoolLastAttended::get_by_id($student->school_last_attended_id);
 if (!$schoolLastAttended) {
     $schoolLastAttended = new SchoolLastAttended();
 }
 $s .= "<cell>" . $schoolLastAttended->school . "</cell>";
 $s .= "<cell>" . $schoolLastAttended->schoolyear . "</cell>";
 $s .= "<cell>" . $schoolLastAttended->program . "</cell>";
 //----------------------------------------------------------------------------------------------------------------------------------//
 $inquiry = Inquiry::get_by_id($student->inquiry_id);
 if (!$inquiry) {
     $inquiry = new Inquiry();
 }
 $s .= "<cell>" . $inquiry->tuition . "</cell>";
 $s .= "<cell>" . $inquiry->program . "</cell>";
 $s .= "<cell>" . $inquiry->others . "</cell>";
 //----------------------------------------------------------------------------------------------------------------------------------//