On Thursday, June 20, 2002, at 02:41 PM, Chris Sechiatano wrote:
> Just a simple question about the HTTP_POST_VARS. I know my forms will > work > if I use only the name of the input. Say a text box called FirstName. > I > can just do: > > print "$FirstName"; > > and everything works fine. Why would I want to use > > print $HTTP_POST_VARS["FirstName"]; > > instead? Read the warning box at this page: http://www.php.net/manual/en/language.variables.predefined.php The short version: in PHP 4.1.2 or later you need to either use $_POST, $_GET, etc unless you set register_global = on (it is "off" by default). You don't really ever want to use $HTTP_POST_VARS, $HTTP_GET_VARS, etc unless you are using a version of PHP from before PHP 4.1.0. In which case you might want to use it in combination with turning register_globals = off, to help yourself avoid making bad coding mistakes. It's no substitute for good coding, but it can help. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php