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

 

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

 

 

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

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.