Browse Source

add php

master
sacha.serny 3 years ago
parent
commit
6f372a8af8
  1. 32
      index.php

32
index.php

@ -0,0 +1,32 @@
<?php
if (isset($_POST['submit'])) {
if (isset($_POST['username']) AND isset($_POST[username])) {
$username = htmlspecialchars($_POST['username'])
$password = htmlspecialchars($_POST['password'])
if ($password == "NSI") {
setcookie("logged", $username, 120)
header('location: google.fr')
}
}
}
?>
<!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">
<input type="text" name="password">
<input type="submit" value="Valider" name="submit">
</form>
</div>
</body>
</html>
Loading…
Cancel
Save