7 Replies Latest reply on Jun 12, 2007 10:09 PM by lovewebdev

    remember where u r

    emmim44 Level 1
      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 ?
        • 1. Re: remember where u r
          Dan Bracuk Level 5
          Yes. Turn the applicable cgi variable into a session variable.

          The tough part will be accounting for missing form or url variables.
          • 2. Re: remember where u r
            jdeline Level 1
            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.
            • 3. Re: remember where u r
              BKBK Adobe Community Professional & MVP
              You could store all the information in a cookie.
              • 4. remember where u r
                lovewebdev Level 1
                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.
                • 5. Re: remember where u r
                  insuractive Level 3
                  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.
                  • 6. Re: remember where u r
                    emmim44 Level 1
                    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.
                    • 7. Re: remember where u r
                      lovewebdev Level 1
                      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.