forked from piqah/DevWeb
[forum] source code
This commit is contained in:
20
login.php
Normal file
20
login.php
Normal 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'; ?>
|
||||
Reference in New Issue
Block a user