|
Posted by P-Rage on 07/13/06 19:41
Jerry Stuckle wrote:
> P-Rage wrote:
> > Hello everyone,
> >
> > I was wondering what could possibly cause Internet Explorer 6 to loop a
> > page usging a header(Location:) statement.
> >
> > For example, a page called 'page1.php':
> >
> > if((isset($_POST['var'])) && ($name='valid')){
> >
> > // insert some data into MySQL.
> >
> > $location = 'page2.php?name='.$name;
> > header(sprintf("Location: %s",$location));
> > exit();
> > }
> >
> > FireFox redirects the user to page2.php as planned. But IE6 loops back
> > to page1.php (refreshes twice on most occasions). Any ideas? Thanks in
> > advance for any help and advice.
> >
>
> What does page2.php do? Is it possible it's doing some checking and
> redirecting the user back to page1.php?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Adam,
I have `exit();` at the end, and that's working, since it doesn't allow
an echo statement after that. I will try the `./` approach, but I find
it odd that IE is the only browser affected by whatever is causing this
issue.
Jerry,
There's nothing in page2.php that brings anything back to page1.php. In
fact, I don't even reach page2.php (tested with a `echo "Page 2.";
exit();` line at the very top of page2.php). Perhaps the answer lies
with previous headers? The following was include()'ed at the top of the
page. It seems pretty standard based on the docs I have read.
[code]
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
[/code]
Thanks for the replies you guys...
[Back to original message]
|