I am working on a project and I want to check the log in credential according to user. When a new user comes and it is log in, then if username present in database then produce an error !
username exist
Code:
include('connect.php');
$query = mysql_query("SELECT * FROM users WHERE user_name = '". $user_name ."' ");
if (mysql_num_rows($query) > 0)
{
echo 'Username already in use please try another.';
}
else{
$opt=$obj->addStudent($user_name,$user_pass,$user_email,$user_contact);
}
}
I want to check ignore case sensitive also.