Page 2 of 2

Posted: Tue Jul 25, 2006 6:15 pm
by Assured99
ok I understand case sensitivity but heres the thing This code worked fine untill i added this code to the redirect.php

Code: Select all

switch ($_SESSION['group1']) { 
    case 'Users': 
        header("Location: http://www.assuredmedical.com/login/sorry.php"); 
        break; 
     case 'Employees': 
        header("Location: http://www.assuredmedical.com/login/emp ... ployee.php"); 
		break;
     case 'Patients': 
        header("Location: http://www.assuredmedical.com/login/patient/patient.php"); 
     	break;
	 case 'Referrals': 
        header("Location: http://www.assuredmedical.com/login/ref ... ferral.php"); 
		break;
     case 'Administrators': 
        header('Location: http://www.assuredmedical.com/secure/ad ... npage.php'); 
        break; 
     default: 
        header('Location: http://www.assuredmedical.com/login/sorry.php'); 
        break; 
}
?>
Could i use this same code to protect each of the redirected pages????

Posted: Tue Jul 25, 2006 11:30 pm
by RobertGonzalez
What stopped working?

Posted: Fri Aug 04, 2006 5:55 pm
by Assured99
Sory for the delay,

The Script stopped protecting the protected pages
(the pages with specific user access)

Posted: Fri Aug 04, 2006 8:04 pm
by RobertGonzalez
I would verify that the session var you are switching on is being set properly and that the value is of the type and format that you expect.

Posted: Sat Aug 05, 2006 3:22 am
by NiGHTFiRE
You could just do on all the pages,

Code: Select all

if(!isset($_SESSION['group'])) {
exit them
}