[PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Henry

The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford

Define the value of $count before registering it, and it should work fine :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford

Ignore that, I'll just go grab my copy of Hooked on Phonics so I can learn to read 
before replying.

:trots off:

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Martin Clifford [EMAIL PROTECTED] 07/17/02 10:15AM 
Define the value of $count before registering it, and it should work fine :o)

Martin Clifford
Homepage: http://www.completesource.net 
Developer's Forums: http://www.completesource.net/forums/ 


 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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



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




Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread 1LT John W. Holmes

If you're going to use $HTTP_SESSION_VARS, then you have to use
session_register().

?
session_start();
session_register('count');
?

Next page:
?
session_start();
echo $HTTP_SESSION_VARS['count'];
?

That should work. If you use $_SESSION, instead, then you don't have to use
session_register.

That's how I understand it...

---John Holmes...

 Henry [EMAIL PROTECTED] 07/17/02 10:14AM 
The answer is probably yes.

I do a
session_start() followed by a $HTTP_SESSION_VARS['count']=2 on one page.
Then I go to another page and do a session_start() again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!

I tried doing a session_register('count2'); $count2=123; in the first page
followed by another page where I display $count2 and that works fine.

Why?

Henry



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



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



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