Solved

keep track of the user church selection

Posted on 2011-09-15
5
305 Views
Last Modified: 2012-05-12
Hi,

I have a question?

what is the best way to keep track of my user church selection.

on my first page I have a listbox of the state, city than churches.  

the user will only see the first page if they did not previously visited my site and selected a church.

How can I keep track of my visitor to what church they selected?

remember I want to keep track of my visitors church selection but not my members.

is it by using session? and set the session to 2 or 3 days or is it by setting a cookie?

Any idea?
0
Comment
Question by:lulu50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 36546979

You don't want to set a session for that long.   This is a perfect use for a cookie.  It's just a preference, no security issue.   use cfcookie to set it, you can make it last for just a couple days or a month of forever...

0
 

Author Comment

by:lulu50
ID: 36547033
but cookie the user can deleted I want something that the user cannot delete.  

what do you think?
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 36547044

why would the user delete the cookie?

Having a session variable last for days doesn't really make sense.   Check out this scenario.

On monday the user sets their church, uses the site, the session variable will remember it for 3 days.

Monday evening, the user closes their browser.

Tuesday morning, the user goes back to the website.  The first session still exists, but the user is NOT using that session - they opened a new browser window.   So, the user has to set the church again...  meanwhile the session is still existing in the background (unusable, for 3 days).

Cookies are really the only way...  
0
 

Author Comment

by:lulu50
ID: 36547060
gdemaria  I agree with you that's it I am going to use cookies.

ok, thanks
0
 

Author Closing Comment

by:lulu50
ID: 36547062
Thank you
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question