Re: [PHP] Some SESSION Vars not Registering

2003-07-25 Thread Jeff Stillwall
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

Re: [PHP] Some SESSION Vars not Registering

2003-07-24 Thread Jeff Stillwall
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 keep the

Re: [PHP] Some SESSION Vars not Registering

2003-07-24 Thread Curt Zirzow
* 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 workaround (I've already

RE: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Ow Mun Heng
'] = $row['access_level']; Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Jeff Stillwall [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 12:02 PM To: Tom Rogers; Warren Vail Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Some

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Curt Zirzow
* 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'];

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Jeff Stillwall
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. quote If register_globals is disabled, only members of the

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Jeff Stillwall
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,

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Jeff Stillwall
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 those.

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Curt Zirzow
* 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.32. hmm..

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Curt Zirzow
* 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 initial

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread Jeff Stillwall
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 function to

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread CPT John W. Holmes
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) { echo

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Tom Rogers
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 ($userArray)

RE: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Warren Vail
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 Vars

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Curt Zirzow
* 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.php

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Jeff Stillwall
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 populated

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Curt Zirzow
* 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) {

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Curt Zirzow
* 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($userArray) at the

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Jeff Stillwall
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