Commit 5a8dbc7d by mhasan

case sensitive searches

parent c84053bf
Showing with 2 additions and 2 deletions
...@@ -27,7 +27,7 @@ if (isset($_POST['submit'])) { ...@@ -27,7 +27,7 @@ if (isset($_POST['submit'])) {
require "php/db_conn.php"; require "php/db_conn.php";
$e = null; $e = null;
$querry = sprintf("SELECT passHash FROM login WHERE userName = '%s' ;", $_POST['userName']); $querry = sprintf("SELECT passHash FROM login WHERE userName = BINARY '%s' ;", $_POST['userName']);
$pdo_st = $pdo->query($querry); $pdo_st = $pdo->query($querry);
$pdo_st->setFetchMode(PDO::FETCH_ASSOC); $pdo_st->setFetchMode(PDO::FETCH_ASSOC);
......
...@@ -15,7 +15,7 @@ if (isset($_POST['submit'])) { ...@@ -15,7 +15,7 @@ if (isset($_POST['submit'])) {
if ($isMatch == true) { if ($isMatch == true) {
session_start(); session_start();
$_SESSION['userName'] = $_POST['userName']; //Starts the session with the username! $_SESSION['userName'] = $_POST['userName']; //Starts the session with the username!
header("location: ../view.php"); //redirects user to view page upon successful login! // header("location: ../view.php"); //redirects user to view page upon successful login!
} }
else { else {
header("location: ../index.php"); //redirects to the index page upon login failure. header("location: ../index.php"); //redirects to the index page upon login failure.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment