Re: How to set up a session variable ?
| From: | Pablo Vera | Date: | Fri, 29 Sep 2000 18:00:41 +0000 |
| Subject: | Re: How to set up a session variable ? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2855@lists.php.net to get a copy of this message | ||
Friday, September 29, 2000, 9:22:04 AM, CESBRON wrote:
CS> when I do at the top of the page
CS> session_register();
CS> $ID++;
CS> it works fine.
CS> The problem is that I have to use the ID on the whole page, and I haven't
CS> got to do $ID++, the $ID variable should be set in a member function. I
CS> could set a variable called $ID in the function, but it seems to be a local
CS> variable only.
CS> I also tried with HTTP_SESSION_VARS['ID'] but it also seems to be a local
CS> variable.
Have you tried declaring that variable as a GLOBAL ?
function whatever() {
global $ID;
...
}
Saludos,
Pablo Vera