1
0
forked from piqah/DevWeb

[forum] source code

This commit is contained in:
root
2026-01-10 00:36:22 +00:00
commit 0c9996065a
9 changed files with 302 additions and 0 deletions

20
login.php Normal file
View File

@@ -0,0 +1,20 @@
<?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'; ?>