Connecting/combining multiple user tables in a MySQL database for different PHP applications on a server subdomains/subfolders

Solution:
You would need to create a single table for your users info like name,mail,password, etc.
Then create a new table to assign an id to each app you want to manage.
Finally you'll need a permissions table with an id_user column and an id_app column to bind the app to your user.
In each app you'll need to specify its "id" based on the apps table you created before. When a user logs in simply store in an SESSION array all the id_app values from the permissions table where the user's id appears and use in_array function to verify if the user is allowed to access the app.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: php undefined array key
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.