Right if I understand this right, then I think this should do the trick: In your href tags to the login page (say login.php) should look like this:
<A HREF="login.php?came_from=A">Click to login</A> for page A and <A HREF="login.php?came_from=B">Click to login</A> for page B. Your login page will now have a variable called $came_from containing either A or B. Now you just want to test this variable and print out another href depending on what came_from is: if ($came_from=="A") print("<A HREF=\"pageA.html\">Click here to be returned</A>"); if ($came_from=="B") print("<A HREF=\"pageB.html\">Click here to be returned</A>"); Will that do? Ross -----Original Message----- From: Michel Laine [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 16:31 To: [EMAIL PROTECTED] Subject: [PHP-WIN] POST & REFERER problem I need some guidance on the following problem. I have a setup where the usage flow is (kinda) like this: Page A ----\ /----\ | ---- Login -+-- [done login] Page B ----/ | \ \ (back to calling page) / -------------------------------- Nice ascii art, heh? Description: I have a working session / authorization system which i want to add a feature to. A user who (either from page A or B) wants to login. The user (if not logged in allready) gets presented a loginscreen (login). To login the user POST the login & pwd to the login page (to itself) for validation. If the login is successful i want to present the user with a link back to the initial page (A or B). How can i do this? All i get from $HTTP_REFERER after the login page is - the login page. I know that i must save the reference as the login page gets called the first time, but i haven't managed to get something to work yet. Any helpful soul out there? -- Michel Laine -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]