This won't work all the time and can't be completely trusted, but you can write a function to deal with different scenarios based on the contents of $_SERVER['HTTP_REFERER'].

Not all browsers will report it, and some will report it incorrectly on purpose.

But you should be able to determine the action requested from the referer in many cases, but you will need to have a default situation defined where you cannot accurately determine the referer.

On 8/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Is there any way to find out the controller/action that a user was at
prior to the current controller/action?  Say you wanted to redirect a
user back to the page they came from - how would you find out that
page?

I'd prefer not to have to keep any sort of history, or last page, in a
session.  Just wondering if the last controller/action comes for free
in CakePHP.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to