Page 1 of 1

Login Script

Posted: Thu Mar 10, 2005 4:44 pm
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?

Posted: Thu Mar 10, 2005 4:51 pm
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 );