Solved

keep track of the user church selection

Posted on 2011-09-15
5
299 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now