Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2. // AUTENTICANDO O USUÁRIO //
  3. $usuario = strtolower($_POST['usuario']);
  4. $senha = $_POST['senha'];
  5.  
  6. $arquivo = './administradores/' . $usuario . '.txt';
  7. $senhaencriptada = md5($senha);
  8. $senhadoarquivo = file_get_contents($arquivo);
  9.  
  10. if (file_exists($arquivo)) {
  11. if($senhaencriptada == $senhadoarquivo){
  12. // AQUI FICARÁ O SISTEMA DE ADMINISTRAÇÃO //
  13. echo "certo";
  14. }else{
  15. echo "errado";
  16. }
  17. } else {
  18. echo "usuario nao existe";
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement