SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Cookie Setting

  1. #1
    SitePoint Addict Resident Evil's Avatar
    Join Date
    May 2003
    Location
    Barrow
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cookie Setting

    I HAVE A POLL, AND ITS ON MY PAGE, I ALSO WANT TO SET A COOKIE,
    AND IFF THAT PERSON HAS VOTED, I WANT TO SHOW HIM THE RESULTS SO FAR, NOT THE VOTE OPTIONS AGAIn.
    HOW WOULD I DO THIS?

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    USA
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried any of these free polls?
    http://www.hotscripts.com/cgi-bin/se...cookie&catid=2
    .
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  3. #3
    SitePoint Addict Resident Evil's Avatar
    Join Date
    May 2003
    Location
    Barrow
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, coz i want everything to be my own
    i think i know how to do it... just asking incase i did it and it went tits up :P

  4. #4
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it's kinda unsafe because I could simply kill the cookie and vote again but anyway. Just look into the $_COOKIE superglobal variable.
    To set an cookie use setcookie, then use
    PHP Code:
    if (isset($_COOKIE['your_cookie_name'])) {

    to check for it.


Bookmarks

Posting Permissions

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