Jump to content
Server Maintenance This Week. ×

Help! setting a cookie


This topic is 8265 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Your problem raises questions for me. I am not very experienced with cookies aside from I know that they let me re-enter this forum without my having to enter my name and password every visit. They also track other data about my visits.

The premise:

The above is the way cookies work until I clear my cookies, which I do from time to time. When there are no cookies set I must manually enter my name and password to use this forum as a contributor. No big deal. I gather that since no cookies are set the name and password entry is processed by the database and then cookies are again set.

I note Jeff is setting a cookie to show the client has already voted. Now let us assume that the client has voted and subsequently they clear their cookies. Then they return to Jeff's site with no cookies.

The questions:

1. Does the "already voted" issue get verified by the database at the time of re-entry to the site when the client has no cookies set?

2. If question 1 is true, why not just handle this as a database function and not use cookies?

3. If question 1 is false, can the client vote twice?

4. What is done about clients who do not want to accept cookies? I know people like that. Are they penalized?

Link to comment
Share on other sites

Hi Keith, here's my reasoning behind the cookie:

We want people to go to the site and cast votes for a trade award.

Last year, I captured IP addresses to catch multiple votes from the same computer, but this doesn't work for dial-up accounts, so I was going to set the cookie and pass the value as a hidden field when the new record was made, and use it to pass a new record reply page that tells them they've already voted and then discount that vote in the database.

This works OK and a few smart users who can delete cookies won't really matter for this, but I can't set the expiry time properly as I'm new to FMP-Cookies.

This is a pain as I thought I would crack the whole ******* thing in an afternoon. frown.gif" border="0

regards, Jeff

Link to comment
Share on other sites

From previous topic:

We cannot influence mach of what WC is sending to the browsers, can’t we? I am following standard syntax and I always had problems with cookies-FM-WC-MSIE. Not so much in Netscape.

I even redesigned couple of my solutions using cookies to tokens and tokens are 100% reliable.

Oh well, one day....

Link to comment
Share on other sites

I posted to the forums about a year ago asking about this... it was my reason for coming here! I found that any expire value over 44639 minutes makes the cookie go psyco. Unfortunately 44639 minutes is only 31 days which is not enough.

But here's the rub: it only happens on NT. If I hosted the site on MacOS the cookies worked OK. This is FMP 4.0v3.

Link to comment
Share on other sites

This topic is 8265 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.