calmchess Posted December 20, 2009 Share Posted December 20, 2009 I want to make my login form case sensitive......what steps would i take to make that happen? Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 20, 2009 Share Posted December 20, 2009 Make the comparison that is being done, case-sensitive. Since you did not post how you are accomplishing this now, it is not possible to give a specific answer. Best guess is you are using a database and comparing using a query. You would need to make the column holding the username be a binary type, such as VARBINARY, or with a collation that results in a case-sensitive comparison. I'll assume you are using an md5/sha1 of the password which would require an exact match. Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980689 Share on other sites More sharing options...
teamatomic Posted December 20, 2009 Share Posted December 20, 2009 $user=strtolower($user); // UseR is now user $uname=strtolower($uname);//USER is now user if ($user == $uname)// is now true HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980692 Share on other sites More sharing options...
PFMaBiSmAd Posted December 20, 2009 Share Posted December 20, 2009 That would make the information case-insensitive, not case-sensitive. Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980699 Share on other sites More sharing options...
calmchess Posted December 20, 2009 Author Share Posted December 20, 2009 well thats a start .......i'm using a database the username uses a column the username is VARCHAR(45)........I just have a form validation function where i want to verify the case sensitivity..some users use TestUser0 and if they use it then i want them to always use it otherwise it throws off otherscripts because linux is case sensitive. thanks PFMaBiSmAd I'll look into what you suggest you have any methods that you would recommend i use to make the coparison that u suggest above? Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980702 Share on other sites More sharing options...
teamatomic Posted December 20, 2009 Share Posted December 20, 2009 yup, my bad! Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980706 Share on other sites More sharing options...
calmchess Posted December 20, 2009 Author Share Posted December 20, 2009 I'm going with md5 comparison match its the easiest to implement Quote Link to comment https://forums.phpfreaks.com/topic/185730-case-sensitivity/#findComment-980712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.