I am working on a web-app system that has multiple apps, each with a Primary Key to identify them. Each user also has a security level tied to an app, for instance App #1 with a security level of 5. I want to store all the app / security information in the database as a token, and then retrieve that information to store it in Session.
So given the following apps:
- Task App
- Email App
- Notes App
and a user that has security level 3, 5, and 7 respectively, the token will be stored as:
1.3|2.5|3.7.
My question is, how do I retrieve that data in a usable form? I was thinking of having it in an array, with the array key of the App ID, like somearray[1] = 3
, somearray[2] = 5
, etc, but I have no idea how to handle this.
I'm early in development on this part, so I have a very open mind towards suggestions. Thanks in advance for the help.