Created
August 8, 2019 01:43
-
-
Save parzibyte/be3f6db469beb0277d72cb995a41f171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$usuario = $_POST["usuario"]; | |
$pass = $_POST["password"]; | |
#Simple y tonta comprobación para efectos de simplicidad | |
session_start(); | |
if($usuario === "admin" && $pass === "0UqiNBK8iQRrtK1yvHosV79h3"){ | |
$_SESSION["admin"] = true; | |
$_SESSION["usuario"] = $usuario; | |
header("Location: tablero.php"); | |
}else if($usuario === "user" && $pass === "4PPvLoH19Jvbhig3rebUZnD63"){ | |
$_SESSION["admin"] = false; | |
$_SESSION["usuario"] = $usuario; | |
header("Location: tablero.php"); | |
}else{ | |
echo "No es válido"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment