BARRAUX Arthur
3 years ago
2 changed files with 29 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title>Login</title> |
|||
</head> |
|||
<body> |
|||
<form action="login.php" method="post"> |
|||
Login: <input type="text" name="login"><br> |
|||
Pwd: <input type="password" name="pwd"><br> |
|||
<input type="submit" value="conexion"> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,16 @@ |
|||
<?php |
|||
session_start(); |
|||
if (isset($_SESSION['login']) && isset($_SESSION['pwd'])) { |
|||
if ($_SESSION['login'] == 'referant') { |
|||
echo 'vous êtes référant'; |
|||
} |
|||
else { |
|||
echo 'vous etes autentifié'; |
|||
} |
|||
} |
|||
else{ |
|||
print_r($_SESSION); |
|||
header('location: ../index.php'); |
|||
|
|||
} |
|||
?> |
Loading…
Reference in new issue