Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 8, 2019 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/be3f6db469beb0277d72cb995a41f171 to your computer and use it in GitHub Desktop.
Save parzibyte/be3f6db469beb0277d72cb995a41f171 to your computer and use it in GitHub Desktop.
<?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