|
|
 |
Re: FN-FORUM: Any way to detect where a user has been redirected from in PHP?
date posted 1st November 2007 17:21
> header('Location: login.php?from=3D);
$_SERVER['REQUEST_URI'] would be more accurate. This would leave off the=
=
".php" if you don't use that in your URLs, and would include any query =
vars.
It might be worth doing an urlencode() on the request URL, as I think PH=
P =
will have urldecoded() it for you when putting it into the $_SERVER arra=
y.
The Location header should have an absolute path, so you need =
http://$_SERVER['HTTP_HOST'] and stuff in there too.
Cheers!
Anthony
-- =
www.fonant.com - Quality web sites
|
 |
|