SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I read the article on SitePoint on how to let user sign up, and how to log in using sessions, etc.

    But how can I securely create a system that allows different levels of users? So after entering a user/pass, some will have access to delete.php, and some won't.

    The user/pass will most likely be store on MySQL, but the script could be use for schools, which have a central server that connects to the net, and they seems to have some trouble with cookies.

  2. #2
    SitePoint Zealot moshe_be's Avatar
    Join Date
    Dec 2000
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two options.

    1) Have diffrent user/pass for each level, and checking if password is first, then level is 1 and so on.

    2) Have to each user assigned level on the database and fetch it along with the user session.

    If there are problems using cookies, you can try the sessions. I learned from http://www.php.net and by looking on free forum scripts.

    After you decided which method you want, just check on the delete.php
    if (CurrentUserLevel < 4)
    {
    echo 'Access denied';
    exit;
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •