On Sunday, January 27, 2002, at 10:39 PM, Jason Wong wrote:
> On Monday 28 January 2002 04:37, Floyd Baker wrote: >> I have 4.1, register globals off, on Windows 98. >> //pull value from session file: >> $page_views = $_SESSION['page_views']; > No need for this, in fact this is what is preventing it from working! > Once > you've used session_register('var'), $var is available for use. > I thought that when register_globals = off, all you need is session_start() at the top of every page and from then on session_register() isn't even needed. I also thought that in fact it was safer to use $_SESSION['variablename'] than to use session_register() each time (well, not safer, but a better habit for the register_globals = off crowd). I'm not disagreeing with you, just asking for clarification. I base this on what I've read in the PHP manual on using session variables (there are some indented blockquotes that suggest this technique for PHP4.1-using register_globals=off-turning PHP coders). Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]