Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
09-25-2012, 11:30 PM #1
- Join Date
- Aug 2011
- Thanked 0 Times in 0 Posts
SQL Create Table with access level?
I was wanting to create a sql table with an 'access level' for certain users.
My website is going to be for children, and parents, so my plan is to give children the user level of 1, and parents the user level of 2, so parents can access all pages, but children cant access parental pages as their access level is only 1.
I tried doing this, but I understand you have to enter a 'default' value for the access level, but I wanted to allow the user to choose their level (example: 'are you a parent or child' dropdown list.
Also, to go with this SQL table, their would have to be a PHP access code which allows only parents to the page when the access level is for members with access level '2' only (and obviously the admin with access level 5)
Does anyone know how to do this? I'm not a genius at PHP and MySQL as I am learning it.
Thanks for your help!.