php - MySql Session from 2 tables -


I will create a login session from 2 tables. If the user name and password match, be an operation table. Does anyone know about that question compared to creating a session from all the fields to join the table?

I'm trying but it is not working:

  $ sql = "SELECT * FROM table1, table2 WHERE username = '$ username' & Amp; And password = '$ password' & amp; amp; table 1.fk = table 2.pk); ";    

your & amp; Amp; to and s

If that does not work, can you tell us what exactly is the output from your query?

Comments