Solved

keep track of the user church selection

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamic Dropdowns 15 33
Ahax pagination 9 33
How do I show metrics with PHP or Javascript 6 34
angular 2 problem setting an object inside a subscribe section 15 22
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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

828 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