Skip to content

Instantly share code, notes, and snippets.

@guibranco
Created November 12, 2018 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guibranco/677c2b59330ce041210045337a3b13b1 to your computer and use it in GitHub Desktop.
Save guibranco/677c2b59330ce041210045337a3b13b1 to your computer and use it in GitHub Desktop.
Login PDO (Alipio Lopes SG) - Desenvolvimento Web - Facebook
<?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