session_register

From: Date: Wed, 05 Jul 2000 16:15:45 +0000
Subject: session_register
Groups: php.dev 
Request: Send a blank email to php-dev+get-23611@lists.php.net to get a copy of this message
I have a question about this function. It isn't specifically stated in the documentation that I can find, but the examples kinda show this but I want to make sure.... Do you call session_register("variable") before or after actually setting the variable? I would think that logically, you set the variable's value then register it: $variable = "this is my string"; session_register("variable"); But it seems that the examples do it the other way around: session_register("variable"); $variable = "this is my string"; If this is the case. Then how do you get past the issue where once the variable is registered it can't be changed? If the variable is registered with the function I would think it registers at that moment with blank information or do all the variables get written when the script ends? Then, in addition, what if you create a session, register variables in it, then later on want to add more variables to the same session. Do you simply just start registering again and they will fit right in? -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.dev (#23611) next »