hi I have the following code........I have tried but failed to make login case sensitive.....( I do not want to use only lower case..I want to make login case sensitive)
<?php
session_start();
$errorMessage = '';
if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) {
$userId = $_POST['txtUserId'];
$password = ($_POST['txtPassword']);
require_once("db_fns.php");//mysql db and username info file
db_connect();
$sql = "SELECT *
FROM adminuser
WHERE username = '$userId' AND password = '$password'";
$result = mysql_query($sql) or die('Query failed. ' . mysql_error());
$row=mysql_fetch_array($result);
$admin=$row['username'];
// print $admin;
if (mysql_num_rows($result) == 1) {
$_SESSION['db_is_logged_in'] = true;
$_SESSION['admin']=$admin;
header('Location: main.php');
exit;
} else {
$errorMessage = 'Sorry, wrong user id / password';
}
}
But this make login without case sensitivity
saifi
Saifi
|