-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonlystudent.php
More file actions
275 lines (225 loc) · 10.5 KB
/
onlystudent.php
File metadata and controls
275 lines (225 loc) · 10.5 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<?php
session_start();
if (!isset($_SESSION["id"])) {
// Redirect to the login page if not logged in
header("Location: login.php"); // Replace with the actual login page
exit();
}
$email = $_SESSION["id"]["email"]; // Assuming "email" is the column name in your database
$conn = new mysqli('localhost', 'root', '', 'userdb');
if ($conn->connect_error) {
die("Connection Failed: " . $conn->connect_error);
}
$stmt = $conn->prepare("SELECT * FROM students WHERE email = ?");
$stmt->bind_param("s", $email);
$stmt->execute();
$result = $stmt->get_result();
$userInfo = $result->fetch_assoc();
$stmt->close();
$conn->close();
?>
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>TEAM | Students Details</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
<!-- Normalize CSS -->
<link rel="stylesheet" href="css/normalize.css">
<!-- Main CSS -->
<link rel="stylesheet" href="css/main.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Fontawesome CSS -->
<link rel="stylesheet" href="css/all.min.css">
<!-- Flaticon CSS -->
<link rel="stylesheet" href="fonts/flaticon.css">
<!-- Animate CSS -->
<link rel="stylesheet" href="css/animate.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="style.css">
<!-- Modernize js -->
<script src="js/modernizr-3.6.0.min.js"></script>
</head>
<body>
<!-- Preloader Start Here -->
<div id="preloader"></div>
<!-- Preloader End Here -->
<!-- Your HTML code for displaying user information goes here -->
<div id="wrapper" class="wrapper bg-ash">
<!-- Header Menu Area Start Here -->
<div class="navbar navbar-expand-md header-menu-one bg-light">
<div class="nav-bar-header-one">
<div class="header-logo">
<img src="img/logo.png" alt="logo">
</div>
</div>
</li>
</ul>
</div>
</div>
<!-- Header Menu Area End Here -->
<!-- Page Area Start Here -->
<div class="dashboard-page-one">
<!-- Sidebar Area Start Here -->
<div class="sidebar-main sidebar-menu-one sidebar-expand-md sidebar-color">
<div class="mobile-sidebar-header d-md-none">
<div class="header-logo">
<a href="#"><img src="img/logo (2).png" alt="logo"></a>
</div>
</div>
<div class="sidebar-menu-content">
<ul class="nav nav-sidebar-menu sidebar-toggle-view">
<li class="nav-item sidebar-nav-item">
<a href="#" class="nav-link"><i class="flaticon-dashboard"></i><span>Contact Us</span></a>
<li class="nav-item sidebar-nav-item">
<a href="grades.php" class="nav-link"><i class="flaticon-classmates"></i><span>Enroll</span></a>
</li>
<li class="nav-item sidebar-nav-item">
<a href="gradestemp.php" class="nav-link"><i class="flaticon-classmates"></i><span>Grades</span></a>
</li>
</li>
</div>
</div>
<!-- Sidebar Area End Here -->
<div class="dashboard-content-one">
<!-- Breadcubs Area Start Here -->
<div class="breadcrumbs-area">
<h3>Profile</h3>
<ul>
<li>
</li>
<li>Student Details</li>
</ul>
</div>
<!-- Breadcubs Area End Here -->
<!-- Student Details Area Start Here -->
<div class="card height-auto">
<div class="card-body">
<div class="heading-layout1">
<div class="item-title">
<h3>About Me</h3>
</div>
<div class="dropdown">
<a class="dropdown-toggle" href="#" role="button"
data-toggle="dropdown" aria-expanded="false">...</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#"><i class="fas fa-times text-orange-red"></i>Close</a>
<a class="dropdown-item" href="#"><i class="fas fa-cogs text-dark-pastel-green"></i>Edit</a>
<a class="dropdown-item" href="#"><i class="fas fa-redo-alt text-orange-peel"></i>Refresh</a>
</div>
</div>
</div>
<div class="single-info-details">
<div class="item-content">
<div class="header-inline item-header">
<h3 class="text-dark-medium font-medium"><?php echo isset($userInfo["lastname"]) ? $userInfo["firstname"] : ''; ?></h3>
<div class="header-elements">
<ul>
<li><a href="#"><i class="far fa-edit"></i></a></li>
<li><a href="#"><i class="fas fa-print"></i></a></li>
<li><a href="#"><i class="fas fa-download"></i></a></li>
</ul>
</div>
</div>
<div class="info-table table-responsive">
<table class="table text-nowrap">
<tbody>
<tr>
<td>Name:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["firstname"]) ? $userInfo["firstname"] : '' ; ?>
<?php echo isset($userInfo["middlename"]) ? $userInfo["middlename"] : '' ; ?>
<?php echo isset($userInfo["lastname"]) ? $userInfo["lastname"] : '' ; ?>
</td>
</tr>
<tr>
<td>Gender:</td>
<td class="font-medium text-dark-medium" id="gender">
<?php echo isset($userInfo["gender"]) ? $userInfo["gender"] : ''; ?>
</td>
</tr>
<tr>
<td>Grade:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["grade"]) ? $userInfo["grade"] : ''; ?>
</td>
</tr>
<tr>
<td>Section:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["section"]) ? $userInfo["section"] : ''; ?>
</td>
</tr>
<tr>
<td>Date Of Birth:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["dateofbirth"]) ? $userInfo["dateofbirth"] : ''; ?>
</td>
</tr>
<tr>
<td>Religion:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["religion"]) ? $userInfo["religion"] : ''; ?>
</td>
</tr>
<tr>
<td>LRN:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["lrn"]) ? $userInfo["lrn"] : ''; ?>
</td>
</tr>
<tr>
<td>E-mail:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["email"]) ? $userInfo["email"] : ''; ?>
</td>
</tr>
<tr>
<td>Admission Date:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["dateenrolled"]) ? $userInfo["dateenrolled"] : ''; ?>
</td>
</tr>
<tr>
<td>Phone number</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["phonenumber"]) ? $userInfo["phonenumber"] : ''; ?>
</td>
</tr>
<tr>
<td>Blood Group:</td>
<td class="font-medium text-dark-medium">
<?php echo isset($userInfo["bloodgroup"]) ? $userInfo["bloodgroup"] : ''; ?>
</td>
</tr>
</tbody>
</table>
</div>
<a href="php/logout.php" class="btn btn-danger">Logout</a>
<!-- Student Details Area End Here -->
<footer class="footer-wrap-layout1">
<div class="copyright">© Copyrights <a href="#">TEAM HD</a> 2023 Project <a href="#"></a></div>
</footer>
</div>
</div>
<!-- Page Area End Here -->
</div>
<!-- jquery-->
<script src="js/jquery-3.3.1.min.js"></script>
<!-- Plugins js -->
<script src="js/plugins.js"></script>
<!-- Popper js -->
<script src="js/popper.min.js"></script>
<!-- Bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<!-- Scroll Up Js -->
<script src="js/jquery.scrollUp.min.js"></script>
<!-- Custom Js -->
<script src="js/main.js"></script>
</body>
</html>