Jump to content

ABOUT REDIRECT PROBLEM


joel danny

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/147875-about-redirect-problem/
Share on other sites

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();
?>

 

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.