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
https://forums.phpfreaks.com/topic/1663-levels-of-start-pages-after-login/
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

Archived

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

×
×
  • 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.