Skip to content
Advertisement

Using multiple queries (only one is working)

i would like to allow multiple users to login according to their userID and forward each user to his page. However only the last if condition works.

Advertisement

Answer

You only need to retrieve the User_type_id from the database and then decide on that which page to go to…

Although a couple of major points – you should be using prepared statements – How can I prevent SQL injection in PHP?.

Also you should not be storing plain text passwords, have a read of How to use PHP’s password_hash to hash and verify passwords

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement