Character Case Problems
So I have my login form in my website.
And for example my username is JuvarAbrera (saved in mysql).
When I try to login using this username ---> juvarabrera
It is still logged-in in my website. Now, I want it NOT to logged-in because of the the J and A are uppercased.
So, how can I do that? I think I explained it very well.
You can collate the value in the query:
SELECT `id` FROM `users` WHERE `username` = 'php_value' COLLATE utf8_general_cs
Change column collation to utf8_bin (i.e. when using utf8_general_ci)
Take care of *_general_* collations because comparisions base on language rules. So have a look
in utf8_general_ci the following is true: 'a'='A', 'ä'='A' in utf8_general_cs the following is true: 'Ä'='A' in utf8_bin none of these is true, and I think that's what you want
The following SQL query will allow for upper-cased names:
SELECT * FROM login WHERE uname = '$username' AND BINARY(uname) = BINARY('$username')