shlocko Posted July 6, 2013 Share Posted July 6, 2013 Okay so I have a completely fully functional member system. Login works, register works, In this system I dont let people make two accounts with the same name, however if they have caps in different spots, it works. Any ideas how to prevent this? Any help is much appreciated! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/279907-mysql-caps-problem/ Share on other sites More sharing options...
shlocko Posted July 6, 2013 Author Share Posted July 6, 2013 Ooh, also, I made it with PHP and MySQL if that helps Quote Link to comment https://forums.phpfreaks.com/topic/279907-mysql-caps-problem/#findComment-1439602 Share on other sites More sharing options...
Solution Psycho Posted July 6, 2013 Solution Share Posted July 6, 2013 Do a check before you allow a duplicate name, I suppose. You haven't supplied any information for us to be able to help you. Where is the code you currently use to verify if the names are similar? You should be doing that check directly with a DB check. In that case, as long as you are using an appropriate collation in the DB, it won't matter if the two values have different letters capitalized. But, if you are going to do it with PH code, then you could use strcasecmp() Quote Link to comment https://forums.phpfreaks.com/topic/279907-mysql-caps-problem/#findComment-1439603 Share on other sites More sharing options...
shlocko Posted July 6, 2013 Author Share Posted July 6, 2013 Thanks, that was precisely what I needed. Sorry I left out a lot of information, but the strcasecom() worked perfectly for what I needed, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/279907-mysql-caps-problem/#findComment-1439604 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.