Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

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
  $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.');
        }
      

Open in new window


What could it be?  Again, under localhost, no issues..
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

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.
Avatar of APD Toronto

ASKER

Still happening
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fiddler?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fiddler - network debugging tool.
http://www.telerik.com/fiddler
Thanks
You're welcome!