42 lines
739 B
PHP
42 lines
739 B
PHP
<?php
|
|
session_start();
|
|
|
|
if(isset($_POST["disconect"])) {
|
|
$_SESSION = array();
|
|
session_destroy();
|
|
}
|
|
|
|
if (isset($_SESSION['user'], $_SESSION['password'])) {
|
|
|
|
$prout = $_SESSION['user'];
|
|
|
|
} else {
|
|
header('Location: index.php');
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
<!DOCTYPE HTML>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="style.css" />
|
|
<title>
|
|
Mon super portfolio
|
|
</title>
|
|
</head>
|
|
<body style="font-family: Arial, sans-serif;">
|
|
<h1>Administration</h1>
|
|
<p>Bonjour <span style="font-weight: bold"><?php echo $prout ?></span></p>
|
|
|
|
|
|
<form action="" method="POST">
|
|
<input type="hidden" name="disconect" value="disconect"/>
|
|
<input type="submit" value="CIAO"/>
|
|
</form>
|
|
|
|
</body>
|
|
</html>
|
|
|