How to make case sensitive password in php?

About Case-sensitive and why it is needed

Some computer languages are case-sensitive. In other words, “Computer” and “computer” are two different words because the letter “C” is in uppercase and lowercase. Many times a password and username is case-sensitive. This means your username or password must have the proper case or you will be unable to login. Often users will experience the inability to log into a case sensitive login because their caps lock key is on, causing the case sensitive password or username to fail.

The user can login with case-insensitive way Means if your password is ‘test’ then user can also be able to login with ‘TEST’ password.

Login from

<?php
$Link = mysql_connect ("localhost","root","") or
	die('Databse not connected'.mysql_error());
mysql_select_db ("Test", $Link);
$username=$_REQUEST['urname'];
$password=$_REQUEST ['pword'];
$selquery="select * from Reg_test where username='$username'";
$result=mysql_query($selquery,$Link);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$pass=$row['username'];
$user=$row['password'];
    if((strcmp($username,$user)) or (strcmp($password,$pass)))
    {
         ?>
        <script lang="javascript">
        alert("Username And Password is wrong, Try again");
        </script>
        <?php
		}
        else
        {
		?>
		<script lang="javascript">
        alert("Username And Password is Correct");
        </script>
		<?php
	}
}
?>
About

Smart Guy/ PHP Developer

Posted in Php Tagged with: , , ,