webtrix Posted February 12, 2004 Share Posted February 12, 2004 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 More sharing options...
holiks Posted February 12, 2004 Share Posted February 12, 2004 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 https://forums.phpfreaks.com/topic/1663-levels-of-start-pages-after-login/#findComment-5465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.