-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
31 lines (29 loc) · 1.16 KB
/
dashboard.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
<?php
session_start();
// Redirect to login page if the user is not logged in
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Dashboard</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css" integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I" crossorigin="anonymous">
</head>
<body>
<?php include 'header.php'; ?>
<div class="container">
<h1>Welcome, <?php echo htmlspecialchars($_SESSION['firstName']); ?>!</h1>
<p>You are logged in with the email: <?php echo htmlspecialchars($_SESSION['email']); ?></p>
<h3>View Available Courses</h3>
<li><a href="viewCourses.php">Available Courses</a></li>
<li><a href="addCourse.php">Add Course</a></li>
<li><a href="registeredCourses.php">Registered Courses</a></li>
<a href="logout.php" class="btn btn-primary">Logout</a>
</div>
</body>
</html>