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
Assured99
Forum Commoner
Posts: 81 Joined: Wed Jul 12, 2006 11:48 am
Location: California
Post
by Assured99 » Tue Jul 25, 2006 6:15 pm
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????
Assured99
Forum Commoner
Posts: 81 Joined: Wed Jul 12, 2006 11:48 am
Location: California
Post
by Assured99 » Fri Aug 04, 2006 5:55 pm
Sory for the delay,
The Script stopped protecting the protected pages
(the pages with specific user access)
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri Aug 04, 2006 8:04 pm
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.
NiGHTFiRE
Forum Contributor
Posts: 156 Joined: Sun May 14, 2006 10:36 am
Location: Sweden
Post
by NiGHTFiRE » Sat Aug 05, 2006 3:22 am
You could just do on all the pages,
Code: Select all
if(!isset($_SESSION['group'])) {
exit them
}