I've found that the following line is useful for tracking where a user has
originated from:

$url = urlencode (basename($_SERVER['PHP_SELF']) . "?" .
$_SERVER['QUERY_STRING']));

Firstly, we'll urlencode the value so it can be used in a form, or as an
extra parameter in the URL.
Then we take the basename of the current script pathname (ie /foo/bar.php
becomes bar.php)
append the question mark for the query string onto it, and then finally the
query string values

Brad

"Rotsky" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using a login routine and I'd like to return the user to the page
where
> they started before going to the login form. I figured I could do this by
> grabbing the current page details, putting these into a session variable
and
> using that to link back to the page later.
>
> So the question is, how do I get the current page's details? I suspect
some
> might say PHP_SELF contained in the $_SERVER array - is this the best way?
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to