Passing page referrer on as variable
| From: | Mallen Baker | Date: | Fri, 30 May 2003 14:48:08 +0000 |
| Subject: | Passing page referrer on as variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149561@lists.php.net to get a copy of this message | ||
I have a login process for an intranet that aims to allow all people to view the intranet front
page, but as soon as they click on a link, they are taken to a login page. Once they have logged in
(authentication via sessions, drawing from info held in a mysql database) they can then go wherever
they want.
What I am trying to get is that when they click on a link and login, the process then forwards them
on to the page whose link they clicked on, rather than presenting them back with the home page.
Basically, every page calls a function that checks whether the person is logged in, and if not
redirects them to the login page. The login page register the $http_referer as a variable on the
form - and when the form is submitted (ie. login takes place) that variable is passed on, and used
for a location: instruction on success.
The real kicker is that this worked fine when I developed it - using IE5 on my Mac (and still does).
Only after a short while did I discover and realise that it wasn't working at all on IE5.5 / 6
on Windows. But surely these are server side operations, and if it works for one it should work for
others?
The only thing I can think of is that IE5.5 on Windows doesn't pass on the referer info in the
same way?? In which case, is there an alternative way of capturing this that would withstand the
differences?
Thanks - Mallen
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________