I have this problem:
I have a database with information about games, and users are able to vote
for them. Everytime a user votes for a game I store the unique game name
into a session variable (an array). So if they are in a page were they
already voted, they won't have the option to do so.
The idea is that the session cookie lasts "forever", I don't want them
voting for the same game everytime they get to the site. This isn't soo
strict, I don't care if some few users don't accept cookies and eventually
vote 2 times for the same game.
So what I did is to have a session cookie with a very large expire time and
I noted that the session variable data is stored in my server
in /temp/sess_blabla
my questions are:
1. how much does this data last?, can I make it last forever with
session_cache_expire()?
I still don't like this solution, data would be lost if I change the server,
I would prefer that the client store this info with his session ID so:
2. I've searched and read that you can store data in a cookie, but coudln't
find the way to do it. Can I store this variable in the users session
cookie?, how?
3. Any better idea?, maybe storing this info in the database?
Thank you. I hope I was clear.
Francisco