Jump to content

saifi4u

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by saifi4u

  1. Thank u very much ylkien......... I was searching for the solution you told..............my problem has been solved.......... But I noticed that one thing should must be clear.......I create table with the sentax: mysql> create table adminuser (username VARCHAR(10), password varchar(10)) CHARACTER SET latin1 COLLATE latin1_bin; this solved my case sensitive login problem..........But both the fields "Username" and "Password" are now case sensitive........ What should I do If I want to make my "Password" field case sensitive and "Username" field still not case sensitive. thanks
  2. Actually I do not need to convert my string to lower case. I need that if password is in lower case then it should not be login with uppercase password string....... this time I enter my password either in lower case or upper case I am able to login which is not good............... password should must be Case sensitive..........for secure login
  3. Hi to all........I have a PHP login page that match the values from a table in mysql table....All the values inserted in MYSql table are of lower case..........But I can login with uppercase also.......... I need my login page case sensitive............the code is as under: <?php session_start(); $errorMessage = ''; if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) { $userId = $_POST['txtUserId']; $password = ($_POST['txtPassword']); require_once("db_fns.php"); 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'; } } ?> thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.