Jump to content

Levels of start pages. after login


Recommended Posts

Hi I hope someone can help me here.

 

I have made a database with all the information i can and will gather, and in this database i have sorted people in to groups such as friends, family, newcommers

and members.

 

What I want is that when people type their login and password they are sent to different pages, sorting them after is they are marked as friends, family and so one.

 

One starting page for friends, another for family and so on.

 

I really hope someone can help me..

 

JBL

 

Link to comment
Share on other sites

1 - show login form

2 - authenticate user against database (draw group details based on user/pass combo)

3 - now you know that he is a member/friend/family/whatever then use something like a header() redirect ...or includes() within switch()

 

$group = mysql_result(mysql_query("SELECT group_name FROM tbl_users WHERE username='$name_input' and password='$pass_input'")) or die(mysql_error());
switch($group)
{
  case 'family': /*include family page*/ ;
  case 'friend': /*include friend page*/ ;
  case 'member': /*include member page*/ ;
}

 

..untested...jst a guide

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.