<tr bgcolor="#868686" style="color:#fff;"> <th> education </th> <th> institutions </th> <th> year </th> <th> %</th> <th> major </th> </tr> </thead> <tbody id="educationalDetails"> <?php $result = $conn->query("select * from job_education_profile where registration_id='{$registration_id}'"); while ($row = $result->fetch_assoc()) { ?> <tr> <td data-title="Education"><?php echo getEducation($conn, $row['education']); ?> </td> <td data-title="Institutions"><?php echo getCollege($conn, $row['college']); ?> </td> <td data-title="Year"><?php echo $row['year_of_completion']; ?> </td> <td data-title="%"><?php echo $row['percentage']; ?> %</td> <td data-title="Major"><?php
if ($conn->query("delete from job_education_profile where id='{$id}'") == TRUE) { $error_msg = "Record deleted successfully"; } else { $error_msg = "Sorry record could not be deleted"; } } else { if ($conn->query("insert into job_education_profile set registration_id='{$registration_id}',education='{$education}',college='{$college}',specialization='{$specialization}',year_of_completion='{$year_of_completion}',percentage='{$percentage}',post_date='{$post_date}',ip_address='{$ip_address}'") === TRUE) { $error_msg = "Record added successfully"; } else { $error_msg = "Sorry record could not be added"; } } $result = $conn->query("select * from job_education_profile where registration_id='{$registration_id}'"); while ($row = $result->fetch_assoc()) { $html .= '<tr> <td data-title="Education">' . getEducation($conn, $row['education']) . '</td> <td data-title="Institutions">' . getCollege($conn, $row['college']) . '</td> <td data-title="Year">' . $row['year_of_completion'] . '</td> <td data-title="%">' . $row['percentage'] . '</td> <td data-title="Major">' . $row['specialization'] . '</td> <td data-title="Remove"><a href="#"><img src="images/remove_iocn.png" class="deleteEdu ' . $row['id'] . '" /></a></td> </tr>'; } echo json_encode(array('html' => $html, 'error_msg' => $error_msg)); } if ($_REQUEST['action'] == "addEmployment") { $html = ""; $error_msg = ""; $registration_id = $_SESSION['registration_id']; $employer_name = $_REQUEST['employer_name']; $start_month = $_REQUEST['start_month'];
</div> </div> <div class="span11 well"> <legend>Educational Profile</legend> <div id="pd"> <div class="row mysrow" style="padding:1px 0px;"> <div class="span2"><strong>Qualification :</strong></div> <div class="span4"><?php echo getEducation($education); ?> </div> </div> <div class="row mysrow" style="padding:1px 0px;"> <div class="span2"><strong>College :</strong></div> <div class="span4"><?php echo getEducation($college); ?> </div> </div> <div class="row mysrow" style="padding:1px 0px;"> <div class="span2"><strong>Specialization :</strong></div> <div class="span4"><?php echo $specialization; ?> </div> </div> <div class="row mysrow" style="padding:1px 0px;"> <div class="span2"><strong>Year of Completion :</strong></div> <div class="span4"><?php echo $year_of_completion; ?>
function getUserEducation($conn, $registration_id) { $sql = "SELECT education FROM job_education_profile where registration_id='{$registration_id}'"; $result = $conn->query($sql); $num = $result->num_rows; $i = 1; while ($row = $result->fetch_assoc()) { if ($i < $num) { $intrest .= getEducation($conn, $row['education']) . ","; } else { $intrest .= getEducation($conn, $row['education']); } $i++; } return $intrest; }