1
0
forked from piqah/DevWeb
Files
DevWeb/login.php
2026-01-10 00:36:22 +00:00

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'; ?>