• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

remember where u r

Participant ,
Jun 08, 2007 Jun 08, 2007

Copy link to clipboard

Copied

Hi females,shemales,males and other genders.

I have a session file, after some idle time it redirects users back to the login page. What I need is the system should remember where the users where after login again to the same application..Is this possible ?
TOPICS
Advanced techniques

Views

475

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 08, 2007 Jun 08, 2007

Copy link to clipboard

Copied

Yes. Turn the applicable cgi variable into a session variable.

The tough part will be accounting for missing form or url variables.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2007 Jun 09, 2007

Copy link to clipboard

Copied

I would use a META refresh tag that places the current page address into the URL. Your login authentication page could see if the URL variable exists, and if so, do a CFLOCATE to that page. As Dan points out, accounting for missing form and URL variables could be tough. Making them session variables will only work if your session timeout is less than the META refresh time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 09, 2007 Jun 09, 2007

Copy link to clipboard

Copied

You could store all the information in a cookie.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 11, 2007 Jun 11, 2007

Copy link to clipboard

Copied

Retrieve the URL of the previous page using HTTP_REFERER and store it in a hidden field in the login form.

You will need to code intuitively so that it's not broken when a user fails a login and is redirected back to the login page or an error page. You just have to make sure to keep passing that same value even if a user fails the login, which is why you may need to store it in a SESSION variable so it is maintained.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 11, 2007 Jun 11, 2007

Copy link to clipboard

Copied

You could incorporate your login form as part of your application.cfm file (include + cfabort), that way the user is not actually redirected before or after login. Of course, with any log in / log out solution you will have to decide whether or not you want to pass form / url variables through the login script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 11, 2007 Jun 11, 2007

Copy link to clipboard

Copied

You totally confused me. I want to retrieve the last thing was being searched by a user before they time out. After they logged in, they should be redirected to the same search criteria.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 12, 2007 Jun 12, 2007

Copy link to clipboard

Copied

LATEST
quote:

Originally posted by: emmim44
You totally confused me. I want to retrieve the last thing was being searched by a user before they time out. After they logged in, they should be redirected to the same search criteria.


Pass the search criteria through a URL variable to the login page. Maintain that variable in the URL after the login.
Then, after login, redirect the user, back to search page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation