You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
if (isset($_POST['submit'])) {
|
|
|
|
if (isset($_POST['username']) AND isset($_POST[username])) {
|
|
|
|
$username = htmlspecialchars($_POST['username']);
|
|
|
|
$password = htmlspecialchars($_POST['password']);
|
|
|
|
|
|
|
|
if ($password == "NSI") {
|
|
|
|
$message = "redirection en cours";
|
|
|
|
setcookie("logged", $username, 120);
|
|
|
|
header('location: machine.php');
|
|
|
|
} else {
|
|
|
|
$message ="accès refusé";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
|
|
<title>M A C H I N E</title>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<link href="stylepagecss/style.css" rel="stylesheet">
|
|
|
|
<link rel="icon" type="image/jpg" sizes="16x16" href="icon.jpg">
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div>
|
|
|
|
<form method="post" action="">
|
|
|
|
<input type="text" name="username" placeholder="Nom d'utilisateur">
|
|
|
|
<input type="text" name="password" placeholder="Mot de passe">
|
|
|
|
<input type="submit" value="Valider" name="submit">
|
|
|
|
</form>
|
|
|
|
<?php if (isset($message)) {echo $message;} ?>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|