RE: [PHP] Follow up: cookies and redirect
| From: | Layne Weathers | Date: | Sat, 02 Dec 2000 19:30:38 +0000 |
| Subject: | RE: [PHP] Follow up: cookies and redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28381@lists.php.net to get a copy of this message | ||
> 1. Click on link 'language' in file_a.php
> 2. file_b.php gets called
> 2.a. it sets a language cookie (deletes previous in case)
> 2.b. redirects back to file_a.php using header("Location: " .
> $HTTP_SERVER_VARS["HTTP_REFERER"]);
>
> Obviously no output is produced by file_b.php, and this works like a
> charm if I use Communicator, but not with IE or Opera. I get no
> redirect.
I have had similar problems (my recollection of which browser(s) were having
problems escapes me) - in one case, the page refreshed but the url in the
location bar stayed the same. My solution was to echo out a meta redirect:
<html><head><meta http-equiv="refresh" content="0; url=<? echo
$whatever; ?>"></head></html>
This has seemed to work on the browsers I normally encounter.
Layne Weathers
Ifworld, Inc.
layne@ifworld.com