[nycphp-talk] Returning users from whiniest they came
bzcoder
bzcoder at bzcode.com
Fri Jul 11 09:52:16 EDT 2008
PaulCheung wrote:
>
> I am guessing the way around my problem is to forget the use of
> HTTP_REFERER and just put the user back to the login page and let the
> user press the back button to let themselves out, or is there a more
> elegant way to do what I want??
Capture the HTTP REFERER when they enter your application to a session
or cookie(some prefer session, some cookie, some do it some other way.
Session or cookie is simple, you can get fancy when you know for sure
what you want to do).. When you exit the application, send them to a
logoff screen, clear out their session information, and display a simple
goodbye message:
"Thank you for using my application, I hope you enjoyed your session.
If you would like to log in again, click here.
If you would like to return from where you came form, click here.
Here are some sites we happen to like and recommend."
Obviously, click here should be styled up and made nice. Don't display
the return from whence you came text if you don't have a referrer for
where they came from. You can make that one a fancy preview thumbnail
link(pop up or not) to help them decide.
And of course, the here are some sites.... is a chance to monetize your
application by accepting advertising, placing affiliate links on your
page, or whatnot.
More information about the talk
mailing list