Jump to content

Archived

This topic is now archived and is closed to further replies.

webtrix

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.