Thanks guys but I have register globals ON so once the session variable is
defined I should be able to address it without specifying $_SESSION ?

-----Original Message-----
From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 11:48 AM
To: BOOT; [EMAIL PROTECTED]
Subject: RE: [PHP] Session confusion again :( - Thanks!

BOOT <mailto:[EMAIL PROTECTED]>
    on Wednesday, April 14, 2004 9:40 AM said:

> What I can't understand is why Test1 shows as nothing, while
> Test2 shows the value I wanted. Thanks a lot!

[snip]

> $_SESSION['element_countp'] = count($p_lnames);
> echo "TEST 1".$element_countp;
> 
> $element_countp = $_SESSION['element_countp'];
> echo "TEST 2".$element_countp;

because in test 1 $element_countp has not been assigned anything yet.

$_SESSION['element_countp'] and $element_countp are *not* the same
variable (it appears that you think they are).

in test 2 you assign the value of $_SESSION['element_countp'] to
$element_countp so that's why test 2 works.


hth,
chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to