session_start and session_register

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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

Quoted text here. Click to load it

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.

Site Timeline