Session weirdness
| From: | Simon Edwards | Date: | Fri, 08 Sep 2000 05:10:59 +0000 |
| Subject: | Session weirdness | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15828@lists.php.net to get a copy of this message | ||
Hi,
Contrary to the manual, the elements of HTTP_SESSION_VARS *don't*
actually seem to be referenced to the corresponding global var. For
example:
------------------------------------------------
session_register("gold_testcounter");
print "test is : ";
print $HTTP_SESSION_VARS["gold_testcounter"];
print " | $gold_testcounter<br>\n";
$HTTP_SESSION_VARS["gold_testcounter"]=42;
print "test is : ";
print $HTTP_SESSION_VARS["gold_testcounter"];
print "| $gold_testcounter<br>\n";
$gold_testcounter = 69;
print "test is : ";
print $HTTP_SESSION_VARS["gold_testcounter"];
print "| $gold_testcounter<br>\n";
------------------------------------------------
Gives:
test is : |
test is : 42|
test is : 42| 69
What's up? Am I reading the manual correctly?
Version 4.0.1pl2, apache, register_globals = on, track_vars = on.
--
Simon Edwards
Animated Design, Melbourne
http://www.animated.net.au/ Ph: (03) 98850990