-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.php
34 lines (29 loc) · 985 Bytes
/
content.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
32
33
34
<?php
session_start();
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
} else {
header('Location: http://localhost/php_course/session/login.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<h1>Welcome <?php echo $_SESSION["username"]; ?></h1>
</div>
<div class="col-12">
<h1>Welcome <?php echo $_COOKIE["username"]; ?></h1>
</div>
<div class="col-12">
<h1><a href="logout.php">Logout</a></h1>
</div>
</div>
</div>
</body>
</html>