Re: authenticate() - thanks, that's what I thought, but wasn't sure.
That's a good point about strtolower() not converting special characters to lower case. Although, I think Rick uses strtolower() in other places for comparing usernames. I wonder if that's a potential problem.
This is PHP, not Java.
![](/forum/images/icons/tongue.gif)
I believe in using the idioms for whatever language I'm using. In PHP (and Perl and C), boolean operations are designed to work with 0 for "false" and nonzero for "true". Using "true" and "false" in PHP is a
bad practice, because you're fighting the language. For example, both "true" and "false" evaluate as true in boolean context. And if you want to compare two boolean values, it's simpler (and more reliable) if you stick with the language conventions.
But if you're going to use "true" anyway, the quotes should be present. Depending on the PHP version and the error_reporting() level, true (without the quotes) will result in a warning or error message.
I'll post my modified version.
![](/forum/images/icons/smile.gif)