"Beauford.2005" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am trying to figure out how to redirect a user back to a page but not > having much luck. > > For example: I click on a menu item on my site which goes to a.php. This > file includes another file that determines if they are logged in or not. > If not, they are sent to login.php using header(:Location: .... ). How > would I automatically redirect them back to a.php after they have logged > in successfully. I have tried using HTTP_REFERRER, but it isn't > redirecting. > > Any help is appreciated.
When you redirect to login.php store the refering page in a hidden form field field and redirect back to that url after the user has logged in succesfully. HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php