I'm trying to make a login script using 2 database tables (authors and editors). I'll post an example of them: Table 1: authors
|id|username|password|
| 1| user | xyz |
Table 2: editors
|id|username|password|
| 1| editor | abcd |
I want to make a single login using these 2 tables. I tried to use:
SELECT * FROM authors, editors WHERE username='mysql_real_escape_string($username)' AND password='mysql_real_escape_string($password)'
but it didn't work. Is there another way that should work for me? Thank you.