On Tue, 12 Oct 2004, Cristi Ocolisan wrote:

> What I'm trying to do is to redirect a user after he/she logs in, to 
> the page where he was (i.e.: if the user was in the product's X 
> description and he/she wants to buy it, after he/she logs in he has to 
> be redirected to the same page).
 
If you want to send the user one page back, $ENV{'HTTP_REFERER'} should 
have the right page, but this isn't always reliable. It isn't hard, for 
example, to configure a browser not to transmit this data.

You'd probably be better off embedding an identifier for the page the 
user was visiting as a hidden form field that is carried forward with 
the login process, &/or stashed in a cookie. Once the user has logged 
in, then send them to the page that the hidden / cookie variable says 
they were looking at previously. 


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to