Hello friends,
How you doing. I need your help. I create a login form. But when i enter a password. its not case-sensitive. If i enter password abc or ABC it show me secure page. but i want password should be case-sensitive.

Thanx.

use strcmp()

<? echo strcmp(test,TEST);?><? echo strcmp(test,test);?>

are you using mysql?
you can do binary select select pass from user where BINARY userid='danny';
or use the three equals signs === in the php script

Well thnx for ur reply....yes i m using my sql..and i solve this problem with md5 function...thanks for ur time..

Member Avatar for rajarajan2017
$fname = clean($_POST['fname']);
//Function to sanitize values received from the form. Prevents SQL injection
	function clean($str) {
		$str = @trim($str);
		if(get_magic_quotes_gpc()) {
			$str = stripslashes($str);
		}
		return mysql_real_escape_string($str);
	}

if( strcmp($password, $cpassword) != 0 ) {
		$errmsg_arr[] = 'Passwords do not match';
		$errflag = true;
	}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.