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?
kurdayon [ Sa, 12 Januar 2008 02:53 ] [ ID #1906246 ]

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.
radmission05 [ Sa, 12 Januar 2008 15:45 ] [ ID #1906267 ]
PHP » comp.lang.php » session_start and session_register

Vorheriges Thema: anyone interested in forming a PHP group in Langley BC Canada
Nächstes Thema: How unique is temporary file names (from file upload)?