} } } if ($page != $lastpage) { echo "<li><a href='" . $lnk . "&p={$next}'>Next →</a></li>"; } else { echo "<li class='disabled'><a>Next →</a></li>"; } } echo <<<next \t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> next; } else { echo "<center><p>No search results found.</p></center>"; } } else { echo "<center><b><i>Specify search key word</i></b></center>"; } echo "</div>"; display_footer(); echo "\n</div></body>\n</html>"; } else { echo "Error : Invalid syntax found in URL<br>"; } } } searchStudents("Attendance Portal - Search Students");
<?php include_once "dbquery.php"; include_once "src/Mandrill.php"; $last_qual = $_POST['last_qual']; $last_marks = $_POST['last_marks']; $degree = $_POST['degree']; $dept = $_POST['dept']; $yop = $_POST['yop']; $sub = $_POST['sub']; $body = $_POST['body']; $last_qual_q = implode("','", explode(",", $last_qual)); $degree_q = implode("','", explode(",", $degree)); $dept_q = implode("','", explode(",", $dept)); if ($result = searchStudents($last_qual_q, $last_marks, $degree_q, $dept_q, $yop)) { $student = array(); foreach ($result as $res) { $temp = array(); $temp['email'] = $res['email']; $temp['name'] = $res['name']; $temp['type'] = 'to'; array_push($student, $temp); } $status = sendMail($student, $sub, $body); echo json_encode($status); } else { echo json_encode(false); } function sendMail($list, $subject, $mailbody) { try {