Converting HTTP_POST_VARS to HTTP_SESSION_VARS !

From: Date: Sat, 04 Aug 2001 17:08:36 +0000
Subject: Converting HTTP_POST_VARS to HTTP_SESSION_VARS !
Groups: php.general 
Request: Send a blank email to php-general+get-61250@lists.php.net to get a copy of this message
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: session_start(); while ( list($name,$value) = each($HTTP_POST_VARS)) { if (is_array($value)) { for($x=0;$x<count($value);$x++) { session_register('$name'); $$name = $value[$x]; } } else { session_register('$name'); $$name = $value; } } Can anyone help me on this ? Also what is register_globals ?? Should I have this on or off ? Thanks Pete

« previous php.general (#61250) next »