|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<?php
|
|
|
|
|
printr("test1");
|
|
|
|
|
|
|
|
|
|
function readUsersFile($filename) {
|
|
|
|
|
$users = [];
|
|
|
|
@ -17,9 +18,9 @@ function readUsersFile($filename) {
|
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
|
|
|
$username = $_POST['username'];
|
|
|
|
|
$password = $_POST['password'];
|
|
|
|
|
|
|
|
|
|
printr("test2");
|
|
|
|
|
$users = readUsersFile('users.txt.lock');
|
|
|
|
|
pritnr("test");
|
|
|
|
|
pritnr("test3");
|
|
|
|
|
if (isset($users[$username]) && $users[$username] == md5($password) ){
|
|
|
|
|
echo "Bienvenue, $username ! Vous êtes connecté.";
|
|
|
|
|
} else {
|
|
|
|
|