note 44301 rejected from language.variables.predefined by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 20 Jul 2004 20:43:19 +0000 |
| Subject: | note 44301 rejected from language.variables.predefined by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73739@lists.php.net to get a copy of this message | ||
Note Submitter: PhPProblem@telenet.be
----
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.