Access to the $_SESSION variable

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I got a problem to access the $_SESSION variable in my script.

I wrote some login code: if the user logs in with his name and password
a user object is stored in the $_SESSION variable.

This all works fine , i can correctly read from that variable later on.

I have an old version of my site under a domain name and the new site
under another
domain name.
I wanted to link the domain name of the old site to the new one, but i
ain't got the data of that domain name (user name and password) so i
can't directly link it to the new site.

The 2 versions of the sites are also on different webspaces.

So i created a new index page on the old site. This page has a simple
frame in it wich loads the index of the new site, so far no problem,
but when i try to login it seems as if the $_SESSION variable is never

Is this possible, and does anyone have an explication for this or a


Re: Access to the $_SESSION variable

Quoted text here. Click to load it

I'm not sure if this is the problem, but I'd like to point out that session  
data is available only for pages under a certain domain. You can't share  
session data between and . (It wouldn't be very  
secure if you could)

"Ohjelmoija  on  organismi  joka  muuttaa  kofeiinia  koodiksi" - lpk - Satunnaisesti pivittyv nettisarjis || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)  

Site Timeline