Search
Left Quote    I have not failed. I've just found 10,000 ways that won't work.
- Thomas Alva Edison    
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: 4,041 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

Code:

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




    Viewed: 4,023 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








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank