(Using PHP + mySQL)
I'm hoping someone can give me an idea as to the best way to handle this situation.
I have two tables, users
and forms
. The users table holds username, password, name, etc. and then the forms table holds various different html forms.
I want to specify which forms a user has access to, on a per user basis. I was thinking about creating a new field in the users table which would be 'forms_allowed' and then storing the form_id of each form the user is allowed to access, separated by commas. Something like 3,6,8,15
Then when I want to check what forms the user is allowed to access and whether they can access the form requested (etc.) i'd grab that field, explode it and check for the form_id.
This seems like a hassle and ineffective way of doing it. Does anyone have a better idea?
Thanks!