Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. $usuario = $_POST["usuario"];
  3. $pass = $_POST["password"];
  4.  
  5. #Simple y tonta comprobación para efectos de simplicidad
  6. session_start();
  7. if($usuario === "admin" && $pass === "0UqiNBK8iQRrtK1yvHosV79h3"){
  8. $_SESSION["admin"] = true;
  9. $_SESSION["usuario"] = $usuario;
  10. header("Location: tablero.php");
  11. }else if($usuario === "user" && $pass === "4PPvLoH19Jvbhig3rebUZnD63"){
  12. $_SESSION["admin"] = false;
  13. $_SESSION["usuario"] = $usuario;
  14. header("Location: tablero.php");
  15. }else{
  16. echo "No es válido";
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement