case sensitive
Posted: Fri Jan 05, 2007 10:06 pm
hi all...i have this bit of code to check passwords in a data base...however, neither the logon or pass checks are case sensitive...how can i do this with php?
Code: Select all
<?php
include("sqlConnect/localhost.php");
$pass_entry=$_POST['pass'];
$logon_entry=$_POST['logon'];
testLogon($pass_entry,$logon_entry);
function testLogon($pass_entry,$logon_entry){
$table="users";
$sql="SELECT * from $table WHERE username='".$logon_entry."'";
$result=mysql_query($sql);
while($row=mysql_fetch_row($result)){
$userPassWord=$row[2];
if($userPassWord==$pass_entry){
echo ("good");
}
}
}
?>