User on multiple subdomains

Discussion in 'PHP' started by HopHop, Jan 25, 2006.

  1. #1
    let`s say i have 2 subdomains : x.domain.com and y.domain.com

    User comes and logins on x.domain.com ... everything is perfect, but while he is logged on he tryes to view y.domain.com ... now here the login is not valid anymore. (basically user authentification on multiple subdomains)

    I underline that both domains are using the same user/pass dbase, I do not want to resolve this by putting cookie into user pocket. I`ve seen something like handling sessions from mysql.
    I couldn`t find any good example on this whole internet, can anyone help me resolve this issue ?
     
    HopHop, Jan 25, 2006 IP
  2. Important

    Important Peon

    Messages:
    87
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just find a tutorial on PHP sessions and that's all you need. But here you are embedding the session id in URLS and not saving them in cookies.

    Or the other way is to a set a global domain cookie.
     
    Important, Jan 30, 2006 IP
  3. Breckenridge

    Breckenridge Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you use the default way of handling session in PHP it will not work because the php session will generate a cookie. Unless you pass the session in the URL I believe that your code will not work.
     
    Breckenridge, Feb 1, 2006 IP