コード例 #1
0
?>
	<!-- Beginning of Secondary School -->
	<table class="table table-hover">
		<caption><h4>Secondary School</h4></caption>
		<thead>
			<tr>
			  	<th>School Name</th>
			  	<th>School Address</th>
				<th>From</th>
				<th>To</th>
			</tr>
		</thead>
		<tbody id="secondary_schools">
			<?php 
$sql_school = "SELECT * FROM secondary_school_attended WHERE applicant_id=" . $session->applicant_id;
$result_school = SecondarySchoolUser::find_by_sql($sql_school);
//print_r($result_school);
if (!empty($result_school)) {
    $k = 1;
    foreach ($result_school as $row) {
        $name = "secondary_school_name_" . $k;
        $address = "secondary_school_address_" . $k;
        $from = "secondary_school_from_" . $k;
        $to = "secondary_school_to_" . $k;
        $sch_id = 'sch_id_' . $k;
        ?>
						<tr>
						  	<td>
						  		<div class="control-group">
									<input type="text" value="<?php 
        echo $row->school_name;
コード例 #2
0
        continue;
    }
    /*obatin applicant id from session*/
    $qualification->applicant_id = $session->applicant_id;
    /*obtain $_POST[$high_id] if it is set and not empty*/
    if (isset($_POST[$qual_id]) && !empty($_POST[$qual_id])) {
        $qualification->other_qualifications_id = $_POST[$qual_id];
    }
    /*insert new record or update existing record in the Other Relevant Qualifications table*/
    if (!$qualification->save()) {
        $error_other_relevant_qualification = true;
    }
    $qualification->other_qualifications_id = null;
}
/*Update Secondary School Attended*/
$school = new SecondarySchoolUser();
$school->db_fields = array('school_id', 'applicant_id', 'school_name', 'school_address', 'from_year', 'to_year');
/*loop for number of Secondary School rows*/
for ($k = 1; $k < $_POST['num_of_sec_school_rows']; $k++) {
    /*keys for post values*/
    $name = "secondary_school_name_" . $k;
    $address = "secondary_school_address_" . $k;
    $from_y = "secondary_school_from_" . $k;
    $to_y = "secondary_school_to_" . $k;
    $sch_id = 'sch_id_' . $k;
    /*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 == '') {