TheEddy Posted August 3, 2010 Share Posted August 3, 2010 $sql = "SELECT * FROM `users` WHERE `emailAddress` = '".mysql_real_escape_string($_POST['email'])."' AND `password` = '".mysql_real_escape_string(md5($_POST['password']))."'"; I currently have it accepting just the email address but I want it to be the email address OR the username. How do I do this? Quote Link to comment Share on other sites More sharing options...
OrangeTux Posted August 3, 2010 Share Posted August 3, 2010 Use brackets, like Where ('emailadres' = '"blabla"' OR 'username' = '"blabla'") AND 'password' = '"blabla"'; Quote Link to comment Share on other sites More sharing options...
TheEddy Posted August 3, 2010 Author Share Posted August 3, 2010 Use brackets, like Where ('emailadres' = '"blabla"' OR 'username' = '"blabla'") AND 'password' = '"blabla"'; Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.