Actualiser dashboard.php
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// Sécurité
|
// Sécurité : redirection si non connecté
|
||||||
if (!isset($_SESSION['user'])) {
|
if (!isset($_SESSION['user'])) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
exit();
|
exit();
|
||||||
@@ -12,6 +12,8 @@ include 'include/nav.php';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<h2>Dashboard</h2>
|
<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'; ?>
|
<?php include 'include/footer.php'; ?>
|
||||||
Reference in New Issue
Block a user