66 users online (1 members and 65 guests)  


  Results 1 to 3 of 3

Related

  1. set multiple cookie    Forum: CGI Perl Forum
    Replies: 0
  2. Set and get cookie using perl    Forum: CGI Perl Forum
    Replies: 1
  3. Set-Cookie    Forum: CGI Perl Forum
    Replies: 1
  4. Perl cookie....    Forum: CGI Perl Forum
    Replies: 2
  1. #1
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    cookie problem...

    i am having trubble with cookies on my forum. i only want to set one cookie on the foum and beable to have the user automaticly login when they go to the site.

    what is happening is, when the user goes to the domain, http://www.tkforums.com it will get the cookie, but if they go to http://tkforums.com the foum will not see the cookie.

    i have set the cookie to both with and without the "www." infront of it, and it does the same thing, but to the other link.

    here is the code it uses to get the cookie:
    Code:
    foreach (split(/; /,$ENV{'HTTP_COOKIE'}))
    (that is not all of the code, that is just the code it uses to get the cookie)

    i think i know what it is doing; i think it is trying to get the cookie coresponding to the domain it is on.

    one of the solutions i had, was;

    Can i get a spacific cookie, like: get the cookie: "www.tkforums.com" insed of getting the cookie "tkforums.com"?

    thanks you
    -ALL
    Last edited by ALL; 03-04-2005 at 01:22 AM.

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Try it with .tkforums.com (note the dot at the beginning)

    Otherwise, try leaving the domain blank.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382
    that worked, thanks,

    actually the forum software that i am using, YaBB is the beta version, so there are a few errors, i have informed them of the problem, and fixed the problem for my self. what they were doing is leaving it blank, so it would use the domain in the address bar.

    thanks again,
    -ALL



Tags for this Thread