AbstractFire Posted November 13, 2007 Share Posted November 13, 2007 I recently rewrote my a login script so that the possibility of an SQL injection is diminished. However, I now have a new issue that I have come across. Since I now compare the username in php rather than in a query, how can I make it so that it compares 2 strings regardless of case and returns true if they match? Link to comment https://forums.phpfreaks.com/topic/77099-solved-disregarding-case-sensitivity-when-comparing-strings/ Share on other sites More sharing options...
rajivgonsalves Posted November 13, 2007 Share Posted November 13, 2007 you could do it using the following function http://php.net/manual/en/function.strcasecmp.php Link to comment https://forums.phpfreaks.com/topic/77099-solved-disregarding-case-sensitivity-when-comparing-strings/#findComment-390459 Share on other sites More sharing options...
AbstractFire Posted November 14, 2007 Author Share Posted November 14, 2007 Perfect! That what I needed. Thanks! Link to comment https://forums.phpfreaks.com/topic/77099-solved-disregarding-case-sensitivity-when-comparing-strings/#findComment-391097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.