"Peter Dowie" <[EMAIL PROTECTED]> wrote in message 001201c11d08$1b3fe280$021ea8c0@petexp">news:001201c11d08$1b3fe280$021ea8c0@petexp... > Hi, > > I'm using sessions and everytime my script is called, I want to add all > elements of $HTTP_POST_VARS to my $HTTP_SESSION_VARS > so that I can access them throughout the session. > I cant seem to get this working. This is what I have: > Why you don't use HTTP_SESSION_VARS??? You don't need to use ression_register/unregister() with $HTTP_SESSION_VARS. Do foreach($HTTP_POST_VARS as $k => $v) { $HTTP_SESSIN_VARS[$k] = $v; } OR $HTTP_SESSION_VARS = array_merge($HTTP_SESSION_VARS, $HTTP_POST_VARS); Important: This kind of code is VERY dangarous unless you check all $HTTP_POST_VARS and you are sure safe to do that. > > Also what is register_globals ?? Should I have this on or off ? off. unless you must use app assumes its on, and cannot fix it. Much easier to write secure code with register_globals=off. (And a little bit faster) Regards -- Yasuo Ohgaki -- 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]