Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST["entrar_botao"])) {
- $user = $_POST["input_user"];
- $pass = $_POST["input_pass"];
- //faz a seleção dos dados
- $checar = $pdo->prepare("SELECT * FROM usuarios WHERE Usuario = :usuario AND Senha = :senha");
- $checar->bindValue(":usuario",$user);
- $checar->bindValue(":senha",$pass);
- $checar->execute();
- //verifica se o usuário está correto
- $selecao = $checar->rowCount();
- if ($selecao > 0) {
- header("Location:administrador.php");
- }else{
- echo "<script>alert('Usuário ou senha incorretos!');</script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement