Hi. I'm just writing a site with PHP to learn more. This is the code to verify the login (just to test): if ( !strcasecmp($_POST['user_id'], 'wtf') ) //do log in Code (markup): 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.
<?php $var1 = "Hello"; $var2 = "hello"; if (strcasecmp($var1, $var2) == 0) { echo '$var1 is equal to $var2 in a case-insensitive string comparison'; } ?>