-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
73 lines (52 loc) · 1.5 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php include_once 'database/connection.php';?>
<?php include_once 'queries/student.php';?>
<?php
$result = $database->query(getAllStudentSql('latest'));
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Students </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row clearfix">
<div class="col-md-2">
</div>
<div class="col-md-8">
<h1> Student list </h1>
<a href="insert.php" class="btn btn-primary"> Add Student </a>
<br><br>
<table class="table table-bordered table-sm">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Roll</th>
<th>Reg</th>
<th>Date of Birth</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php while ($row = $result->fetch_assoc()) { ?>
<tr>
<td><?php echo $row['Id']; ?></td>
<td><?php echo $row['Name']; ?></td>
<td><?php echo $row['Roll']; ?></td>
<td><?php echo $row['Reg']; ?></td>
<td><?php echo $row['Age']; ?></td>
<td>
<a href="delete.php?id=<?php echo $row['Id'] ?>" class="btn btn-danger"> Delete </a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>