-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathloggedin.php
More file actions
45 lines (40 loc) · 1.73 KB
/
loggedin.php
File metadata and controls
45 lines (40 loc) · 1.73 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
<?php
session_start();
function isAuthenticated() {
return isset($_SESSION['user_id']) && isset($_SESSION['user_email']);
}
if (!isAuthenticated()) {
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>Logged In!</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="tailwind.config.js"></script>
<link rel="stylesheet" href="css/custom.css">
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
</head>
<body>
<section class="bg-white dark:bg-gray-900">
<div class="py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6">
<div class="mx-auto max-w-screen-sm text-center">
<h1 class="mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-primary-600 dark:text-primary-500">200</h1>
<p class="mb-4 text-3xl tracking-tight font-bold text-gray-900 md:text-4xl dark:text-white">Welcome, <?php echo isset($_SESSION['user_name']) ? $_SESSION['user_name'] : 'John Doe'; ?></p>
<p class="mb-4 text-lg font-light text-gray-500 dark:text-gray-400">You have been logged in successfully!. </p>
</div>
</div>
<div class="flex items-center justify-center">
<a href="#" id="logout" class="inline-flex items-center justify-center px-4 py-2.5 text-base font-medium text-center text-white bg-primary-700 rounded-lg hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:focus:ring-primary-900">
Logout
</a>
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="js/script.js"></script>
</body>
</html>