Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 18, 2019 18:49
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/5baef69638f7701936695cbe73db73fc to your computer and use it in GitHub Desktop.
Save parzibyte/5baef69638f7701936695cbe73db73fc to your computer and use it in GitHub Desktop.
<?php
# Nota: no estamos haciendo validaciones
$correo = $_POST["correo"];
$palabra_secreta = $_POST["palabra_secreta"];
# Luego de haber obtenido los valores, ya podemos comprobar
# Incluimos a las funciones, mira funciones.php
include_once "funciones.php";
$logueadoConExito = login($correo, $palabra_secreta);
if ($logueadoConExito) {
# Redirigir a secreta
header("Location: secreta.php");
# Y salir
exit;
} else {
# Si no, entonces indicarlo
echo "Usuario o contraseña incorrecta";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment