-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomepage.php
More file actions
30 lines (27 loc) · 722 Bytes
/
homepage.php
File metadata and controls
30 lines (27 loc) · 722 Bytes
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
<?php
session_start();
// Check if the user is logged in
if (isset($_SESSION['user_id'])) {
$isLoggedIn = true; // User is logged in
} else {
$isLoggedIn = false; // User is not logged in
}
?>
<!DOCTYPE html>
<html>
<head>
<title>CV Generator</title>
</head>
<body>
<h1>CV Generator</h1>
<?php if (!$isLoggedIn) { ?>
<!-- Display login and register buttons if the user is not logged in -->
<a href="login.php">Login</a>
<a href="register.php">Register</a>
<?php } else { ?>
<!-- Display create and view CV buttons if the user is logged in -->
<a href="create_cv.php">Create</a>
<a href="view_cv.php">View CV</a>
<?php } ?>
</body>
</html>