blasterstudios
Technical User
I'm trying to run a query to retrieve a username/password. I have two fields in my database. 1 is their free registered email with the site, and the other is an alternate email address. I need to use what is submitted in form as "email" to pull records out of the database if they match 1 of the 2 columns. What i have works for the alternate email (because it's stored as name@domain.com). I encounter a problem when it checks for the registered email because it's not stored as an email address, but just the first part (i.e. name without the @domain.com).
Here's what i've tried:
Here's what i've tried:
Code:
"SELECT
userid,
username,
password,
CONCAT(dfemail,'@dichiarafamily.com') AS dfemail,
otheremail
FROM
df_users
WHERE
dfemail = '" . $_POST['email'] . "' OR
otheremail = '" . $_POST['email'] . "'"