Admin on php website

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

GUSMAN

Thread Starter
Joined
Dec 19, 2001
Messages
774
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
 
Joined
Feb 25, 2004
Messages
445
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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top