Stupid question about sessions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Stupid question about sessions

Post by Perfidus »

Hi everyone, my valuable friends!
When you declare a session and then you use a launchwin function, does this brand new open window keeps the session values or are they fu%&$d, because I'm getting very nervous with a script and maybe this is all...
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

Window does not hold session variables, they are in session cookie. So you can access current session from the new window.
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Post by Perfidus »

I'm setting the session like this in main window:

Code: Select all

$_SESSION['language'] = $choosen;
And after from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

echo $_SESSION['language'];

Code: Select all

echo $_SESSION['language'];
_SESSION['language'] = $choosen;


And after from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

echo $_SESSION['language'];
fter from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

$_SESSION['language'] = $choosen;
And after from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

echo $_SESSION['language'];
ssion like this in main window:

Code: Select all

$_SESSION['language'] = $choosen;
And after from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

echo $_SESSION['language'];
$_SESSION['language'] = $choosen;


And after from the poped one, I'm trying to echo it, but it doesn't work:

Code: Select all

echo $_SESSION['language'];
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

do you have

Code: Select all

session_start();
echo $_SESSION['language'];
'language'];N['language'];1]
session_start();
echo $_SESSION['language'];
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Post by Perfidus »

Yes, sorry, this is what I have in the main window.
User avatar
dethron
Forum Contributor
Posts: 370
Joined: Sat Apr 27, 2002 11:39 am
Location: Istanbul

Post by dethron »

you should also make the session started in brand new window.
Post Reply