forked from piqah/DevWeb
21 lines
509 B
PHP
21 lines
509 B
PHP
<?php
|
|
require 'includes/config.php';
|
|
require 'includes/header.php';
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
if ($_POST['user'] === ADMIN_USER && $_POST['pass'] === ADMIN_PASS) {
|
|
$_SESSION['admin'] = true;
|
|
header("Location: flag.php");
|
|
exit;
|
|
}
|
|
echo "Hehehe bien tenté! ;) mais non";
|
|
}
|
|
?>
|
|
<form method="POST">
|
|
<input name="user" placeholder="user">
|
|
<input name="pass" type="password" placeholder="password">
|
|
<button>Login</button>
|
|
</form>
|
|
|
|
<?php require 'includes/footer.php'; ?>
|