session_start and session_register
Hi All,
is that OK if I declare the same variable in the same file several
times? For example somewhere in the beginning of a file I have
session_register("cat") and than, somewhere in the middle of the file,
I have again session_register("cat"). Can the second declaration
destroy the value of the variable cat?
Is that OK if I start_session several times in the same file? Will the
second "start_session" open a new session?
Re: session_start and session_register
On Jan 11, 5:53 pm, Kurda Yon <kurda... [at] yahoo.com> wrote:
> Hi All,
>
> is that OK if I declare the same variable in the same file several
> times? For example somewhere in the beginning of a file I have
> session_register("cat") and than, somewhere in the middle of the file,
> I have again session_register("cat"). Can the second declaration
> destroy the value of the variable cat?
>
> Is that OK if I start_session several times in the same file? Will the
> second "start_session" open a new session?
i think its depend, if the $cat value doesnt change, it will not the
value $_SESSION['cat'] will be the same,
but if $cat value change before the declaration of
session_register($cat), of course $_SESSION['cat'] will change.
------------------------------------------------------------ -------------
and will also depend on how you code it.