Actualiser dashboard.php

This commit is contained in:
2026-03-19 15:37:08 +00:00
parent 4201a1b26f
commit b37c4bf6b1

View File

@@ -1,7 +1,7 @@
<?php
session_start();
// Sécurité
// Sécurité : redirection si non connecté
if (!isset($_SESSION['user'])) {
header("Location: login.php");
exit();
@@ -12,6 +12,8 @@ include 'include/nav.php';
?>
<h2>Dashboard</h2>
<p>Bienvenue <?php echo $_SESSION['user']; ?></p>
<p>Bienvenue, <?php echo htmlspecialchars($_SESSION['user']); ?> (<?php echo htmlspecialchars($_SESSION['role']); ?>)</p>
<a href="logout.php">Se déconnecter</a>
<?php include 'include/footer.php'; ?>