1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Admin on php website

Discussion in 'Web Design & Development' started by GUSMAN, Jan 18, 2007.

Thread Status:
Not open for further replies.

    GUSMAN Thread Starter

    Dec 19, 2001
    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

  2. cpscdave


    Feb 25, 2004
    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
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/536248

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice