title: php login using 2 database tables
body: <p>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</p>
  
  <pre><code>|id|username|password|
  | 1|  user  |  xyz   |
  </code></pre>
  
  <p>Table 2: editors</p>
  
  <pre><code>|id|username|password|
  | 1| editor |  abcd  |
  </code></pre>
  
  <p>I want to make a single login using these 2 tables. I tried to use:</p>
  
  <pre><code>SELECT * FROM authors, editors WHERE username='mysql_real_escape_string($username)' AND password='mysql_real_escape_string($password)'
  </code></pre>
  
  <p>but it didn't work.
  Is there another way that should work for me?
  Thank you.</p>