WebServ/www/public/M6/04/index.php

24 lines
581 B
PHP
Raw Permalink Normal View History

2024-09-19 11:47:33 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>M6 | 04</title>
</head>
<body>
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
2024-09-24 13:06:22 +00:00
if(isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
echo "<h1>Good</h1>";
echo $_SESSION['username'];
echo "<br>";
echo $_SESSION['name'];
}
2024-09-19 11:47:33 +00:00
else echo "<h1> No good </h1>";
?>
2024-09-24 13:06:22 +00:00
<br> <br>
2024-09-19 11:47:33 +00:00
<a href="login.php">Log In</a>
</body>
</html>