-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathajax.php
29 lines (23 loc) · 855 Bytes
/
ajax.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require("dbconnect.php");
$a = $_POST['data'];
$sql = "select * from student where fullname like '%$a%' ";
$query = mysqli_query($conn, $sql);
//execute($sql);
$num = mysqli_num_rows($query);
if($num >0){
while($row = mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $row['id']; ?></td>
<td><?php echo $row['fullname']; ?></td>
<td><?php echo $row['msv']; ?></td>
<td><?php echo $row['class']; ?></td>
<td><?php echo $row['gpa']; ?></td>
<td width="60px"><button class="edit btn btn-outline-warning" onclick=\'window.open("input.php?id='.$std['id'].'","_self")\'>Sửa</button></td>
<td width="60px"><button class="delete btn btn-outline-danger" onclick="deleteStudent('.$std['id'].')">Xóa</button></td>
</tr>
<?php
}
}
?>