Re: Session problem
| From: | Yasuo Ohgaki | Date: | Thu, 09 Aug 2001 01:51:29 +0000 |
| Subject: | Re: Session problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61932@lists.php.net to get a copy of this message | ||
"Hassan El Forkani" <webmaster@warmafrica.com> wrote in message
news:5.1.0.14.2.20010807152322.00a35800@pop.runbox.com...
>
> indeed it's not working properly,
> first of all please make sur the pages are not cashed send a header
> (Cache-control: NO cache) i'm not sure about the syntax so check the
manual
> then try to modify your code like this and tell us what happens:
>
> <?php
> if (!HTTP_SESSION_VARS['count'])
> {
> global $count;
> $count = 0;
> session_register ("count");
You don't need session_register() with $HTTP_SESSION_VARS. Just assign
vlaue. If you want to unregister, just use unset().
Using session_(un)register() with $HTTP_SESSION_VARS is tricky. So
don't use. (You can save lines, too)
--
Yasuo Ohgaki