Page 1 of 1

[RESOLVED] strange login function problem with IE

Posted: Sun Mar 25, 2007 8:12 pm
by mencius
Hi. I'm just writing a site with PHP to learn more.

This is the code to verify the login (just to test):

Code: Select all

if ( !strcasecmp($_POST['user_id'], 'wtf') )
//do log in
Now the case of the input shouldn't matter and it works in both Firefox and Opera. But in IE I found that if I use left "shift" button to type in caps, then it won't work, but using "caps" and right "shift" works?? In Firefox and Opera, both "shift" and "caps" work.

This is the link http://redrum.no-ip.info/speed/index.php you can try it out.

I also tried this on my other desktop and laptop and same thing happens.

I wrote a script to test the encoding the of input ( http://redrum.no-ip.info/speed/detect.php ). I just use the function mb_detect_encoding() to test the $_POST variable and I find that when I use the right shift button in IE and it doesn't work, it won't return an encoding. All other times when it works, it returns ASCII. I don't know if this has anything to do with it.

Does anyone why? Thanks.