Created
November 12, 2018 15:53
-
-
Save guibranco/677c2b59330ce041210045337a3b13b1 to your computer and use it in GitHub Desktop.
Login PDO (Alipio Lopes SG) - Desenvolvimento Web - Facebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$login =$_POST["login"]; | |
$senha =$_POST["senha"]; | |
$sql = "SELECT 1 FROM login WHERE Admn = :admin AND Senha = :senha"; | |
$query = $pdo->prepare($sql); | |
$query->bindValue(":admin", $login); | |
$query->bindValue(":senha", $senha); | |
$result = $query->execute(); | |
if($query->rowCount() == 1) | |
header("Location: ../sobre.php"); | |
else | |
heaader("Location: ../tecnicoInformatica.php"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment