Need help with cookie not saved on my subdomains

Discussion in 'PHP' started by vipvanlines, Dec 26, 2006.

  1. #1
    hello,
    i have website www.myurl.com
    with login system and all this.
    when some1 login to the website and going to my community place:

    community.myurl.com

    the cookie is like he appers offline,

    he cant post msgs...

    like he have to login again or smthing like that.

    thank u for support
    liran
     
    vipvanlines, Dec 26, 2006 IP
  2. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to set the cookie for .mysite.com.
     
    Icheb, Dec 26, 2006 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    As Icheb said do this:

    
    setcookie("domainname", $domainvalue, time()+31104000000, "/", ".domain.com", 0);
    
    PHP:
    Peace,
     
    Barti1987, Dec 26, 2006 IP