Isn't HTTP_REFERER sent by the browser ?
I'm pretty sure there are even browsers/firewall like tools that cloak this.
Or am I wrong ?

Piet.

> -----Original Message-----
> From: Paul Menard [mailto:[EMAIL PROTECTED] 
> Sent: donderdag 7 april 2005 16:43
> To: [email protected]
> Subject: Re: [php-list] Back to original page after login
> 
> 
> 
> Um. I'm not really sure I ever saw the original message. But 
> I have read through the two posts this morning and can say 
> they really seem like overkill. I mean base-64 encoding the 
> original URL and passing it as a variable seems very 
> convoluted (sorry no slam to the posted meant).
> 
> The best solution is to capture the HTTP_REFERER value in the 
> login page. This is passed automatically and cannot be controlled. 
> 
> My thoughts. Some times the easiest answers are the best.
> 
> Paul
> 
> 
> 
> 
> 
> 
> --- Patrick Bierans <[EMAIL PROTECTED]> wrote:
> > > I'm working in my first site using authentication and sessions. 
> > > Users can log in from any page on the site.
> > >
> > > However...when a user logs in, how do I direct them back 
> to the page 
> > > they were viewing? This would include the variables that 
> are passed 
> > > to the MySQL database.
> > >
> > > Is there a way to look back in the browser history a couple of 
> > > pages?
> > 
> > Yes: javascript and history.go() but don't!
> > 
> > On redirect pass the url the user wanted to open and use header() to
> > redirect to it on successful login.
> > For example:
> > 
> > <?php // index.php?page=something
> >   header('location: login.php?nextpage='.$page');
> > ?>
> > 
> > <?php // login.php
> >   session_start();
> >   if (user_logged_in($formdata))
> >     header('location: index.php?page='.$nextpage'&'.SID);
> > ?>
> > 
> > But take a look at my application structure example. It shows you a
> > different technique which is much more simple.
> > http://bierans.de/shared 
> > 
> > 
> 
> 
> Community email addresses:
>   Post message: [email protected]
>   Subscribe:    [EMAIL PROTECTED]
>   Unsubscribe:  [EMAIL PROTECTED]
>   List owner:   [EMAIL PROTECTED]
> 
> Shortcut URL to this page:
>   http://groups.yahoo.com/group/php-list 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to