Re[2]: [PHP] session question
| From: | Max A. Derkachev | Date: | Wed, 31 Jan 2001 08:30:35 +0000 |
| Subject: | Re[2]: [PHP] session question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37437@lists.php.net to get a copy of this message | ||
Hello Teodor,
Wednesday, January 31, 2001, 10:49:34 AM, you wrote:
TC> Hi Mark!
TC> On Wed, 31 Jan 2001, Mark Green wrote:
>> How about this:
>>
>> session_start();
>> session_register($funky_session_var);
>> $funky_session_var ++;
>> print $funky_session_var;
TC> the order doesn't matter (as it did in PHPLib sessions).
TC> If it doesn't work I guess it's because you have register_globals off.
First, I believe the variable should be initialized first (even in
favour of common sense), and then registered.
Second, session_register($funky_session_var) gives your nothing (if
not an error). You should session_register('funky_session_var')
instead (the NAME of the variable, not the variable itself).
--
Best regards,
Max A. Derkachev mailto:kot@books.ru
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia