John and Curt;
Thank you both very much for your help (and persistence) in this matter.
Ultimately, I used John's suggestion: creating $_SESSION['userArray'][vars].
It works. I get to keep my vars named what I want. In some ways, it's more
elegant than what I was doing in that it compartmentaliz
* Thus wrote Jeff Stillwall ([EMAIL PROTECTED]):
> "CPT John W. Holmes" wrote:
>
> > Why not just
> >
> > $_SESSION['userArray'] = $userArray;
> >
> > ??
> >
> > Then $_SESSION['userArray']['fname'] to access the values, for example.
>
> Well, yes, that does work. And it's an acceptable worka
"CPT John W. Holmes" wrote:
> Why not just
>
> $_SESSION['userArray'] = $userArray;
>
> ??
>
> Then $_SESSION['userArray']['fname'] to access the values, for example.
Well, yes, that does work. And it's an acceptable workaround (I've already
updated my code). It's nice in that it let's me ke
From: "Jeff Stillwall" <[EMAIL PROTECTED]>
>
> Now I'm (possibly) getting somewhere:
>
> When I modify the function to be this (notice the key name change by
adding
> "s"):
>
> function setupUserEnv ($userArray) {
>
> $_SESSION['loggedIn'] = 1;
>
> foreach($userArray as $key=>$value) {
>
"Curt Zirzow" wrote:
> I modified this to do 31 variables:
> http://zirzow.dyndns.org/php/session.php
Thanks again.
> The only thing i can think, mabey, is size limit? how long are these
> values your assigning?
Not long at all.
Now I'm (possibly) getting somewhere:
When I modify the functio
* Thus wrote Jeff Stillwall ([EMAIL PROTECTED]):
> "Curt Zirzow" wrote:
>
> > I've set up something what you describe, it works for me:
> >
> > http://zirzow.dyndns.org/php/session.php
>
> OK, here's more fuel for the fire. When passed to this function, $userArray
> is 31 elements long. The in
* Thus wrote Jeff Stillwall ([EMAIL PROTECTED]):
> "Curt Zirzow" wrote:
>
> > So i would also assume you have called session_start() already. and yes
> > global for version >= 4.1.0
>
> Yes, I have session_start at the top of every page, and have run this
> against PHP versions 4.12, 4.31 and 4.3
"Curt Zirzow" wrote:
> I've set up something what you describe, it works for me:
>
> http://zirzow.dyndns.org/php/session.php
OK, here's more fuel for the fire. When passed to this function, $userArray
is 31 elements long. The initial function I was using (and posted) was only
grabbing 6 of th
"Ow Mun Heng" wrote:
> I'm new but.. aren't you also supposed to register the session??
The code I posted was just a single function. I am calling session_start()
at the head of the page. Thanks, though.
--
Jeff Stillwall
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
"Curt Zirzow" wrote:
> So i would also assume you have called session_start() already. and yes
> global for version >= 4.1.0
Yes, I have session_start at the top of every page, and have run this
against PHP versions 4.12, 4.31 and 4.32.
>
> If register_globals is disabled, only members of the g
* Thus wrote Ow Mun Heng ([EMAIL PROTECTED]):
> I'm new but.. aren't you also supposed to register the session??
>
> My code ..
>
> session_start();
> session_register('username');
> $_SESSION['username'] = $row['username'];
> session_register('user_id');
> $_SESSION['user_id'] = $row['user_id']
dnesday, July 23, 2003 12:02 PM
To: Tom Rogers; Warren Vail
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Some SESSION Vars not Registering
"Tom Rogers" wrote:
> I am sure they do not but
> I just tried reading the docs and it is as clear as mud so its back to
> the
"Tom Rogers" wrote:
> I am sure they do not but
> I just tried reading the docs and it is as clear as mud so its back to
> the suck it and see method
>From the on-line docs, regarding $_SESSION (at
http://us3.php.net/manual/en/reserved.variables.php#reserved.variables.sessi
on):
"This is a '
* Thus wrote Jeff Stillwall ([EMAIL PROTECTED]):
> "Tom Rogers" wrote:
>
> > Try passing a reference to the array like this
> >
> > function setupUserEnv (&$userArray) {
> [snip]
> > }
> >
> > Otherwise no idea at this point :)
>
> I could give that a shot, but as I mentioned, if I var_dump($us
* Thus wrote Jeff Stillwall ([EMAIL PROTECTED]):
> I have a function that assigns some session variables I need available
> during a user's visit. Oddly enough, as I assign about 7 variables, I
> noticed that not all had data. This is the function:
>
> function setupUserEnv ($userArray) {
>
"Tom Rogers" wrote:
> Try passing a reference to the array like this
>
> function setupUserEnv (&$userArray) {
[snip]
> }
>
> Otherwise no idea at this point :)
I could give that a shot, but as I mentioned, if I var_dump($userArray) at
the beginning of the function, I see that $userArray is pop
* Thus wrote Warren Vail ([EMAIL PROTECTED]):
> Don't all variables registered to a session need to be declared as global?
no
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
Don't all variables registered to a session need to be declared as global?
Warren Vail
[EMAIL PROTECTED]
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 6:15 PM
To: Jeff Stillwall
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Some SESSION Var
Hi,
Wednesday, July 23, 2003, 6:22:58 AM, you wrote:
JS> I have a function that assigns some session variables I need available
JS> during a user's visit. Oddly enough, as I assign about 7 variables, I
JS> noticed that not all had data. This is the function:
JS> function setupUserEnv ($userArra
19 matches
Mail list logo