joel danny Posted March 4, 2009 Share Posted March 4, 2009 Hi all I am having a problem while i am running in the Firefox and IE browser ============================================================ This is my redirect code in (index.php) here i just want the user to login into the site <?php if($_SESSION['AdminLogin']=="") { ///check login } if(isset($_SESSION['AdminLogin'])) { /// if already set then redirect him to the controlpanel header("location:controlpanel.php"); } ?> This above code works for the FIREFOX ,but when i just run this one in the IE it did't redirects the user to the controlpanel.php I want the login'd user wont go back to the login screen at any more... if he/she gets login into the site....i want them not to go to the index.php (login page).In that page I checked that isset($_SESSION['AdminLogin']) if SESSION is already set then redirect him to the controlpanel itself... Works in Firefox not in IE...Please advice how to come out his problem...Sorry for my bad english... Thanks and Help me jo Quote Link to comment Share on other sites More sharing options...
WolfRage Posted March 4, 2009 Share Posted March 4, 2009 If header is not working consistently for you. From: http://us2.php.net/manual/en/function.header.php Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later. Use <?php echo '<meta http-equiv="Refresh" content=".001;url= /controlpanel.php">' //should actually be a full url though. exit(); ?> Quote Link to comment Share on other sites More sharing options...
joel danny Posted March 4, 2009 Author Share Posted March 4, 2009 If header is not working consistently for you. From: http://us2.php.net/manual/en/function.header.php Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later. Use <?php echo '<meta http-equiv="Refresh" content=".001;url= /controlpanel.php">' //should actually be a full url though. exit(); ?> Thanks for you reply .... thanks But is that the IE bug?..I am not sure about this one ... While clicking the back button it takes me back to the login page .. that is IE browser upper back button..... I tried the above code already ..but this is also not work for me.. Thanks ..... Hope i will get some more suggestions here in this forum. can anyone?... Thanks Jo Quote Link to comment Share on other sites More sharing options...
Yesideez Posted March 4, 2009 Share Posted March 4, 2009 I'd try removing the space in your header() statement and initial capitalise "location" to "Location" - IE can be fussy at times... header("Location: controlpanel.php"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.