Left Quote    Maybe this world is another planet's Hell.
- Aldous Huxley    
Right Quote
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply

        Viewing Topic: User Groups
  This user is offline  Simsonite
  Subject: "User Groups" Posted: @ 3:28 pm on Nov 30 2008   
Member #: 795
Rank: user - (1)
Since: 11/30/08
Posts: 1

Hi so far the member system looks great, i hope i can fix that header issue but other than that great tutorial.

However how can i add user groups?

    Viewed: 5,456 Times | Reply to This | To top
  This user is offline  Genius
  Subject: "re: User Groups" Posted: @ 12:12 am on Dec 01 2008    

Member #: 582
Rank: user - (77)
Since: 02/18/08
Posts: 76
From: kmmk

Add a row called usergroup and place IDs in them. For example,
1 = Admins
2 = Mods
3 = Members

So when user registers add them as members to db. And you can assign session name user_group when they login. So if you want only mods to access certain page just do a check like


if ($_SESSION['us er_group'] == '2') { echo "You are a Mod!"; else echo "Get the hell outta here!";

    Viewed: 5,438 Times | Reply to This | To top
Viewing Page: 1 of 1

1 |

You must be logged in to post on the forums. Login or Register

"" Copyright © 2002-2021; All rights lefted, all lefts righted.
Privacy Policy