Hi,
I have a few 'secure' area where the user needs to log-in b4 they can make
view it.
I know how to redirect them to the login page but how can I return them to
the page they were?
if I get the path ...and save it, (in a cookie or in MySQL ).
$ReturnUrl = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
the path is relative to the root directory,
(http://uk.php.net/reserved.variables).
And then try and use it (b4 all the headers are sent).
header( 'refresh: 20; url='.$ReturnUr l );
It does not work properly, ( the query strings is truncated). if I place it
in quotes then the system adds http:\\ in the string.
What is the best way to return to a page full path, (including the query
string).
Many thanks Sims
I have a few 'secure' area where the user needs to log-in b4 they can make
view it.
I know how to redirect them to the login page but how can I return them to
the page they were?
if I get the path ...and save it, (in a cookie or in MySQL ).
$ReturnUrl = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
the path is relative to the root directory,
(http://uk.php.net/reserved.variables).
And then try and use it (b4 all the headers are sent).
header( 'refresh: 20; url='.$ReturnUr l );
It does not work properly, ( the query strings is truncated). if I place it
in quotes then the system adds http:\\ in the string.
What is the best way to return to a page full path, (including the query
string).
Many thanks Sims
Comment