简体   繁体   中英

How can i check two tables in the login process

我的数据库客户和管理员中有两个表我希望登录过程检查输入的值并将其与管理员和客户进行比较,如果管理员打开管理页面,如果客户打开客户页面

You need to show what you have attempted so we know where to start from. But you can achieve your aim like so:

  1. You need to check the login details on the admin table.

  2. If it returns true then you use the header to redirect the page to the admin page.

  3. Else if it returns false then check the login details on the costumer table.

  4. If it returns true then you use the header to redirect the page to the costumer page.

  5. Else you output an error message.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM