Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. $user = $_GET['user'];
  3. $pass = $_GET['pass'];
  4. include("bd.php");
  5. if($valida[$user]==$pass){
  6. setcookie("logado", "1");
  7. echo "<script>location.href='main.php?usuario='$user</script>";
  8. }
  9. else{
  10. echo "<font face=verdana size=2>";
  11. echo "Usuário ou senha incorretos!";
  12. echo "<br>";
  13. echo "<a href=login.html>";
  14. echo "Clique aqui</a> para tentar novamente.";
  15. echo "</a></font>";
  16. }
  17. ?>
  18.  
  19.  
  20. <?php
  21. if(IsSet($_COOKIE["logado"])){}
  22. else{
  23. echo '<meta http-equiv="refresh" content="0;url=login.html">';
  24. exit;
  25.  
  26. }
  27. ?>
  28. <html>
  29. <head>
  30. <title>Sistema de usuários</title>
  31. </head>
  32. <body>
  33. <font face="Verdana" size="2">
  34. <br><br> <a href="logout.php">Sair (finalizar) (logout)</a>
  35. </font>
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement