Is there a way to make an if statement not need an exact match between 2 fields?
so for example when checking "Test" and "test" it would say that they were the same and not treat them as not matching?
not match by case
Moderator: General Moderators
thanks, i can see how that detects cahracters but i need something different i think.
I have a session variable set from a username when a user logs on.
For security it is checked against a username held in a database on some pages.
The problem is, if the user enters "Test" to logon and "test" is in the database a loop comparing the 2 doesn't think they match due to the capitol.
I have a session variable set from a username when a user logs on.
For security it is checked against a username held in a database on some pages.
The problem is, if the user enters "Test" to logon and "test" is in the database a loop comparing the 2 doesn't think they match due to the capitol.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
dont bother with the other suggestions, WAY to much hassel
http://us2.php.net/manual/en/function.strcasecmp.php
http://us2.php.net/manual/en/function.strcasecmp.php