$HTTP_POST_VARS confusion

From: Date: Wed, 04 Oct 2000 23:31:08 +0000
Subject: $HTTP_POST_VARS confusion
Groups: php.general 
Request: Send a blank email to php-general+get-18680@lists.php.net to get a copy of this message
Hello! I have a question about the variables posted in a form. Supposedly, register_globals in the PHP config file enables you to simply use a variable/value pair that was included in a posted form (such as $username.) However, I am using a function to process my form, and I can't seem to get the function to do this without adding a global declaration at the beginning of the function, such as global $username. This quickly becomes a pain as well as being non-extensible. I made sure register_globals was turned on, and I even added $HTTP_POST_VARS to the global declaration, but I have had no success. What is the right solution to this problem? (Note: I tried to figure out a workaround using the array generated by $HTTP_POST_VARS, but it didn't work. Perhaps someone has a suggestion as to how to declare variables by cycling through an array?) Erica

« previous php.general (#18680) next »