-
Notifications
You must be signed in to change notification settings - Fork 0
/
all_student.php
38 lines (38 loc) · 1.3 KB
/
all_student.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
30
31
32
33
34
35
36
37
38
<table class="table table-bordered table-hover project_table">
<thead>
<tr>
<th>Student Name</th>
<th>Matric</th>
<th>Level</th>
<th>Department</th>
<th>Date Added</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<?php
$query = $db->query("SELECT * FROM student");
$rows = $query->fetchAll(PDO::FETCH_OBJ);
foreach($rows as $row){
$name = $row->name;
$department = $row->department;
$level = $row->level;
$matric = $row->matric;
$date = $row->date;
?>
<tr>
<td><?php echo $name; ?></td>
<td><?php echo $matric; ?></td>
<td><?php echo $level ?></td>
<td><?php echo $department ?></td>
<td><?php echo $date; ?></td>
<td>
<a class="btn btn-xs btn-primary" href="edit_std_data.php?id=<?php echo $row->id; ?>"><i class="fa fa-edit"></i></a>
<a class="btn btn-xs btn-danger" onclick="return confirm('Are you sure you want to delete project? ')" href="delete_std_data.php?id=<?php echo $row->id; ?>"><i class="fa fa-trash"></i></a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>