Solved

keep track of the user church selection

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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
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…

738 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