I do this on one of my sites.
In the code for the log in page I examine $_SERVER['HTTP_REFERER'] and if
they've come from within my site I store the page in a hidden form field - since
you're using sessions you could use a session variable for this. When the
password is returned, if it's valid and there's a page stored use
something like: header ("location: pageucamefrom.php") to send them back to the
original page (this has to be before anything else is sent to the browser)
otherwise I send them to the index page.
HTH
PT
>
>
> 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?
>
> Jer
The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> 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/