-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlessons.php
More file actions
124 lines (98 loc) · 4.44 KB
/
lessons.php
File metadata and controls
124 lines (98 loc) · 4.44 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html>
<head>
<title>Lessons</title>
<link rel="icon" href="img/micon.svg" />
<link rel="stylesheet" href="style.css" />
<!-- Bootstrap -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<!-- Icon link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" />
</head>
<body class="b4">
<!-- Header -->
<header class="sticky-top">
<div class="px-3 py-2 text-bg-dark">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<a href=""
class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none">
<img src="img/rc_logo.svg" class="bi me-2" id="rc_logo" width="40" role="img"
aria-label="Bootstrap" />
<label for="rc_logo" style="color: rgb(255, 208, 0);">ROYAL COLLEGE</label>
</a>
</ul>
<form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3" role="search">
<input type="search" class="form-control" placeholder="Search..." aria-label="Search">
</form>
<div class="dropdown text-end">
<a href="#" class="d-block link-light text-decoration-none dropdown-toggle"
data-bs-toggle="dropdown" aria-expanded="false">
<label for="profie" style="color: white;">Rashindu Tharinda</label>
<img src="img/profile.png" id="profile" alt="mdo" width="32" height="32"
class="rounded-circle">
</a>
<ul class="dropdown-menu text-small">
<li><a class="dropdown-item" href="">Profile</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Sign out</a></li>
</ul>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<h2 class="text-center py-5 large" style="color: rgb(0, 0, 94);">Lessons</h2>
<div class="row">
<table class="t">
<thead>
<tr class="text-start pt-5">
<th>No.</th>
<th>Lessons</th>
</tr>
</thead>
<tbody>
<?php
$conn = new mysqli("localhost", "root", "#KHrashi522", "sms1", "3306");
$q = "SELECT * FROM `lessons`";
$rs = $conn->query($q);
$n = $rs->num_rows;
for ($x = 0; $x < $n; $x++) {
$d = $rs->fetch_assoc();
?>
<tr>
<td>
<?php echo ($d["id"]); ?>
</td>
<td>
<?php echo ($d["lesson"]); ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<div class="container">
<footer class="py-4">
<hr class="mt-5">
<p class="text-center text-muted">© 2023 Royal College.</p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
</html>