sacha.serny 3 years ago
parent
commit
dbcf5c54f4
  1. 12
      index.php

12
index.php

@ -1,12 +1,15 @@
<?php
if (isset($_POST['submit'])) {
if (isset($_POST['username']) AND isset($_POST[username])) {
$username = htmlspecialchars($_POST['username'])
$password = htmlspecialchars($_POST['password'])
$username = htmlspecialchars($_POST['username']);
$password = htmlspecialchars($_POST['password']);
if ($password == "NSI") {
setcookie("logged", $username, 120)
header('location: google.fr')
$message = "redirection en cours";
setcookie("logged", $username, 120);
header('location: machine.html');
} else {
$message ="accès refusé";
}
}
}
@ -27,6 +30,7 @@ if (isset($_POST['submit'])) {
<input type="text" name="password">
<input type="submit" value="Valider" name="submit">
</form>
<?php if (isset($message)) {echo $message;} ?>
</div>
</body>
</html>

Loading…
Cancel
Save