note 44301 added to language.variables.predefined

From: Date: Tue, 20 Jul 2004 20:19:10 +0000
Subject: note 44301 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-73734@lists.php.net to get a copy of this message
Hi, I'm trying to use $_SESSION to store the user language. However, I don't administer the server which is a SUN (SunOS 5.7) with apache: 1.3.28 and php: 4.3.2. The browser is mainly IE 6.0 when I try the following: <?php // page1.php session_start(); $_SESSION['UserLang'] = $English; // ==> 1 print($_SESSION['UserLang']); // prints "1" ?> but when I try to retrieve the value in a second script <?php session_start(); printf ($_SESSION['UserLang']); // prints "0" ?> Even a session_register and session_is_registered combination doesn't give me the correct value. Did anyone ever notice something similar? I have the same problem with cookies, they work fine within one script, but don't try to read them in a second page. ---- Manual Page -- http://www.php.net/manual/en/language.variables.predefined.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44301 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44301&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44301&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#73734) next »