For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2007 > How to do a case in-sensitive match ??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to do a case in-sensitive match ??
NevadaSam

2007-05-06, 9:11 am

My MySQL statement is OK. It will select the email regardless of the case of any letters. It is:

code:
SELECT email FROM tablename WHERE email = '{$_POST['email']}'



When the comparison is made in PHP it all letters are not exactly the same case the comparison returns false.
I need to compare $_POST['email'] to a case in-sensitive $Row['email'] in this if statement.


PHP:

if ($_POST['email'] == $Row['email']) {
        echo 
$Row['email'];
    }
    else {
        echo 
"No matches";
    }

Necropheliac

2007-05-09, 4:47 am

http://Pamela-Anderson-in-nylons.in...hp?movie=148803
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com