Skip to content

Instantly share code, notes, and snippets.

@lbattaglioli2000
Created November 29, 2016 06:10
Show Gist options
  • Save lbattaglioli2000/533e41f55b778fbe6d2ffbe3cfbcb410 to your computer and use it in GitHub Desktop.
Save lbattaglioli2000/533e41f55b778fbe6d2ffbe3cfbcb410 to your computer and use it in GitHub Desktop.
<?php
include("dbh.php");
$email = $_POST["email"];
$password = $_POST["password"];
$sql = "SELECT * FROM users WHERE email='$email' AND password='$password'";
$results = $conn->query($sql);
if(!$row = mysqli_fetch_assoc($result)){
echo "Your username or password is incorrect.";
}else{
echo "You are logged in.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment