Question about session_register()

From: Date: Fri, 19 Jan 2001 21:11:56 +0000
Subject: Question about session_register()
Groups: php.general 
Request: Send a blank email to php-general+get-35725@lists.php.net to get a copy of this message
I have a question about session_register(), and the following is the background.... When I read a tutorial about session. I know that, once the "session_start()" is called, it will check the session id. If it's not valid, create a new one, and it will responible to retrieve the variable. I also learns about the usage of session_register(). It is a function to register a variable which will be used throughout a session. My question is, when the user first visit, a session created, and I register the variable. On the second, or following hits, to use the session variable, I also need "session_start", but should I still need to call session_register() for each hit? e.g. in script 1, I have a $foo, which should be a session variable, then <? session_start(); session_register(foo); ...... ?> in script 2, I still have to use that "$foo", as what I have read from the tutorial, a session_start() is already prepare that sesson variable for me, when the script is being parsed, <? session_start(); //should I still have to add such a statement? session_register(foo); ?> I know my english is poor, so I use a lot of words to show my question, pls forgive!!!

« previous php.general (#35725) next »