Page 1 of 1

Stupid question about sessions

Posted: Mon Jul 04, 2005 10:54 am
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...

Posted: Mon Jul 04, 2005 11:22 am
by wwwapu
Window does not hold session variables, they are in session cookie. So you can access current session from the new window.

Posted: Mon Jul 04, 2005 11:31 am
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'];

Posted: Mon Jul 04, 2005 11:38 am
by wwwapu
do you have

Code: Select all

session_start();
echo $_SESSION['language'];
'language'];N['language'];1]
session_start();
echo $_SESSION['language'];

Posted: Mon Jul 04, 2005 11:47 am
by Perfidus
Yes, sorry, this is what I have in the main window.

Posted: Mon Jul 04, 2005 6:37 pm
by dethron
you should also make the session started in brand new window.