Re: simple session question
| From: | Chris Lee | Date: | Tue, 27 Feb 2001 13:47:05 +0000 |
| Subject: | Re: simple session question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41838@lists.php.net to get a copy of this message | ||
looks like it might. I do a simple isset() to see if it is set.
<?php
session_start();
if (!isset($HTTP_SESSION_VARS['count']))
{
$count = 5;
session_register('count');
}
?>
works for me.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
lee@mediawaveonline.com
"John LYC" <john@edlabs.com> wrote in message
news:3A9B5BE3.7EDAF955@edlabs.com...
> does session_register() "over-write existing variable of the same
> name...?
>
> for example..
>
> //count already registered and holds value 3.
>
> session_register("count");
>
> print $count; //output null;
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>