I want to be able to check my email if it equals $e but my email is in another table called info how can I can I fix this problem?
Here is my MySQL query so far.
"SELECT password, salt FROM users WHERE (email = '" . $e . "' OR username = '" . $e . "') AND active IS NULL"
Use a JOIN:
Note: you may need to modify the line starting
ONdepending on how you have structured your schema. If you are unsure of what modification to make, update your question to include the output ofSHOW CREATE TABLE usersandSHOW CREATE TABLE info.Also you might want to double-check that there isn’t an SQL injection vulnerability in your code. It is good practice to use parameters, or at least make sure that the strings are properly escaped. It is not clear from your code extract if you are escaping correctly or not.