APD Toronto
asked on
The page isn't redirecting properly
Hi Experts,
I've just uploaded a PHP code that works on my localhost, but on the server FF gives me:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
IE just hangs.
The code behind this is
What could it be? Again, under localhost, no issues..
I've just uploaded a PHP code that works on my localhost, but on the server FF gives me:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
IE just hangs.
The code behind this is
$user = $_POST['txtUser'];
$password = $_POST['txtPassword'];
$login_status = Login::verify_login($user, $password);
if ($login_status == 'admin') {
header('Location: index.php?action=list');
}
else if ($login_status == 'rs') {
header('Location: ../dispatch');
}
else {
header('Location: ../?type=err&msg=User Id / Password combination not found.');
}
What could it be? Again, under localhost, no issues..
Always add a die() underneath header() lines that redirect the Location. Not sure if it's relevant, but it'll avoid continuing to run the script, which could introduce unexpected behavior.
ASKER
Still happening
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fiddler?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Fiddler - network debugging tool.
http://www.telerik.com/fiddler
http://www.telerik.com/fiddler
ASKER
Thanks
You're welcome!