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 ?
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.
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.