travail en colab avec alexis et nicolas sur un partage
This commit is contained in:
parent
41fe4b5b32
commit
aad22c9bc7
@ -20,7 +20,7 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
if (password_verify($password, $hash)) {
|
if (password_verify($password, $hash)) {
|
||||||
if ($login) {
|
if ($login) {
|
||||||
$_SESSION['login'] = $login;
|
$_SESSION['login'] = $login;
|
||||||
header('Location: ../index.html');
|
header('Location: ../index.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
echo "Échec de la connexion : couple login/mot de passe invalide.";
|
echo "Échec de la connexion : couple login/mot de passe invalide.";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "Échec de la connexion : login invalide.";
|
echo "Échec de la connexion : login inconnu.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -41,30 +41,32 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<link rel="icon" href="../img/jo2024.jpg" >
|
||||||
<link rel="stylesheet" href="../css/style.css">
|
<link rel="stylesheet" href="../css/style.css">
|
||||||
<title>Page de Connexion</title>
|
<title>Connexion - Jeux Olympiques</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="content_cours">
|
<div id="content_cours">
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="../index.html">Page d'accueil</a>
|
<a href="../index.php" class="categorie">Page d'accueil</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
<h2>Connexion</h2>
|
<h2>Connexion</h2><br>
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<label for="login">Login :</label><br>
|
<label for="login">Login :</label><br>
|
||||||
<input type="text" id="login" name="login" value="<?php if (isset($_REQUEST['login'])) { echo $_REQUEST['login']; } ?>"><br>
|
<input type="text" id="login" name="login" required value="<?php if (isset($_REQUEST['login'])) { echo $_REQUEST['login']; } ?>"><br>
|
||||||
<label for="password">Mot de passe :</label><br>
|
<label for="password">Mot de passe :</label><br>
|
||||||
<input type="password" id="password" name="password" value="<?php if (isset($_REQUEST['login'])) { echo $_REQUEST['login']; } ?>"><br>
|
<input type="password" id="password" name="password" required placeholder="••••••••" value="<?php if (isset($_REQUEST['login'])) { echo $_REQUEST['login']; } ?>"><br>
|
||||||
|
|
||||||
<input type="submit" value="Se connecter">
|
<input type="submit" value="Se connecter">
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user