Follow up: cookies and redirect
| From: | Andrea Resmini | Date: | Sat, 02 Dec 2000 17:01:02 +0000 |
| Subject: | Follow up: cookies and redirect | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28369@lists.php.net to get a copy of this message | ||
I can add some details more, after a bit of testing.
A bit of history:
I have a small switch-language-on-the-fly routine, which basically works
like this:
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.
Now, it looks like the problem is directly related to HTTP_REFERER not
being set (or received, better) by the browser. This surely happens with
Opera on Linux (loading phpinfo() with Communicator clearly displays
HTTP_REFERER (or HTTP_SERVER_VARS[HTTP_REFERER], as you prefer), while
no sign of it comes up firing it up in Opera), but I suppose this
applies to IE also (two problems in the same three-line routine looks
like too much to me :) ).
Now, I think I can try and solve this problem by passing along the
calling filename (file_a.php, in the example) to file_b.php, and I'll
make some more tests during the weekend, but I'd like to know if anyone
can confirm such behaviour or had any problem like this.
Thanks,
--
Andrea Resmini
a.resmini@ogcs.com
hypermedia development, OGCs.com
http://www.ogcs.com