Tech Support Guy banner
Status
Not open for further replies.
1 - 2 of 2 Posts

· Registered
Joined
·
774 Posts
Discussion Starter · #1 ·
Hi
I have created a small site to try my hand at php. I have a register page where I can add users but what I want is for an admin to only be allowed to access certain parts ie I want to be able to delete and edit members but only want one person (admin) to be able to do it

Is there an easy way ?

Much app

Gus
 

· Registered
Joined
·
447 Posts
Depending on what you are trying to do. You may want to look into using a framework of some sorts to help you build your page.

We use ourselves radicore. A good framework will give you this sort of thing for free (ie you wont have to do the code yourself). But that's secondary.

What you'll need to do is add the concept of roles to your login. SO when you give your username/password to acceess the secure area of the site you track in the session if they are a user or a admin.

then you can add a check on any page you dont want users to have access to, to see that they are an admin, if not you send them back to the previous page.

Hope that helps :D
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top