Login Script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tm1274
Forum Newbie
Posts: 2
Joined: Sat Feb 14, 2004 8:52 pm

Login Script

Post by tm1274 »

I am new to programming and have been given the task of creating 3 login area's on our site that will allow multiple users to login, but to only one of the 3 area's using 1 login box. It is apparently some sort of redirection that needs to occur but I cannot figure it out. I have spent 3 days looking all over the internet for any information to help, but anything I found was a dead end. Can anyone help me to create something?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

switch($user_type)
{
  case 'admin' :
    $url = 'adminpage.php';
    break;
  case 'moderator' :
    $url = 'i.r.moderator.php';
    break;
  default:
    $url = 'i.crummy.user.php';
    break;
}

header( 'Location: ' . $your_site_url_root . $url );
Post Reply