Hello i am having a problem with my code. The code is part of a php login auth which detects if username and password from form match the database. The problem is username is case sensitive how can i change it so its not case sensitive:

elseif ( $act == "authmember" ) {


$query2 = mysql_query("SELECT * FROM member WHERE UserName='$membername' ")
or die("Could not insert data because ".mysql_error());
$qry2 = mysql_fetch_array( $query2 );

if ( $membername == "$qry2[UserName]" AND $memberpassword == "$qry2[Password]" ) {
echo "login will work";
echo "not working $membername and $memberpassword";