How to create string PAssword, PaSsword, etc.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: How to create string PAssword, PaSsword, etc.

Post by Apollo »

Jonah Bron wrote:Sorry Apollo, I stole your avoid-strtoupper-every-time idea. If it's any consolation, I probably would have come up with it eventually... Please don't strike me down with a bolt of lightning 8O
Hehe no of course, it's not a contest, we're here for entertainment and learning. And I certainly learned from your approach, so thanks :)
Jonah Bron wrote:Any minute Feyd is going to make one that's faster than yours and smaller than mine.
Hehe yeah probaby, already wondered what kept him so long ;)
Brenden
Forum Newbie
Posts: 12
Joined: Fri May 28, 2010 2:12 am

Re: How to create string PAssword, PaSsword, etc.

Post by Brenden »

Personally I would put each word in once, in lowercase, then run strtolower() on any word before searching for it in the database. But perhaps I'm just not complicated enough.
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: How to create string PAssword, PaSsword, etc.

Post by Apollo »

Brenden wrote:Personally I would put each word in once, in lowercase, then run strtolower() on any word before searching for it in the database.
In fact, I would use utf8_general_ci collation and don't mind about upper or lowercase at all. :D
But perhaps I'm just not complicated enough.
Worse yet, you take all the fun out of challenges like these! ;)
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: How to create string PAssword, PaSsword, etc.

Post by Jonah Bron »

The "bolt of lightning" was a reference to your username :lol:

Peace
Post Reply