Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#textbox').keyup(function(){
- $("#display_students").text('');
- var name = $('#textbox').val();
- if($.trim(name) != ''){
- $.post('../core/Query/students/student_search.php', {st_process: name}, function(data){
- $("#display_students").append(data);
- });
- }
- });
- <?php
- if(isset($_POST['st_process']) === true && empty($_POST['st_process']) === false){
- include("../Query-core.php");
- include('../db.php');
- $authentication = new DBRequest($host = 'localhost',
- $user = 'root',
- $pass = '',
- $db = 'contas');
- $selectedstudents = $authentication->selectionQueryLike("alunos", $authentication->e(trim($_POST['st_process'])), "student_process");
- if(mysqli_num_rows($selectedstudents) > 0){
- echo "<table><tr><th>Nome</th><th>NºProcesso</th><th>ID</th><th>Apagar</th></tr>";
- while($row = $selectedstudents->fetch_assoc()){
- echo "<tr>";
- echo "<td><a href='#'>" . $row["student_name"] . "</a></td>";
- echo "<td>" . $row["student_process"] . "</td>";
- echo "<td>" . $row["student_ID"] . "</td>";
- echo "<td><a href=?usrdelete=" . $row["student_ID"] . ">Delete<a/></td>";
- echo "</tr>";
- }
- echo "</table>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment