Cookies Problem

Results 1 to 2 of 2

Thread: Cookies Problem

  1. #1
    Join Date
    Dec 1969

    Default Cookies Problem

    Hi everybody,<BR><BR>My problem goes like this.<BR><BR>I am making a polling application. The user sees a question with 3 options. He selects one option and submits. On submit I show him the results page where i show the answers in percentage.<BR><BR>I want the user to poll only once in a day one a machine. For this i write a cookie.<BR>Now my problem is if the user refreshes the results page after submit, then again the database value for that option is incremented by 1. How can i prevent this increment even if the user refreshes the results page?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Cookies Problem

    how about reading the previously written cookie(if there any) in the onLoad event of the page(javascript), and determining whether to allow him going forward or rejecting him out then and there even before talking to the database.if no cookie is read , means that is the first time and can be allowed to go for poll.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts