Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

keep track of the user church selection

Posted on 2011-09-15
5
Medium Priority
?
310 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

636 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