prashanth ag
asked on
php " this webpage has a redirect loop "
I am using the following code in login.php
this webpage has a redirect loop ( chrome )
webpage isn't redirecting properly (Firefox )
if (isset($_SESSION['username'])){
if($_SESSION['type'] != "Admin"){
header('Location: panel/index.php');
}
else if($_SESSION['type'] != "Manager"){
header('Location: admin/index.php');
}
else
{
header('Location: Manager/index.php');
}
I get the error during login this webpage has a redirect loop ( chrome )
webpage isn't redirecting properly (Firefox )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, you're logic seems a little off.
If 'type' is anything but Admin, the first if block will be fired.
If it is Admin, then the second block will be fired
The third block will never be fired!