Here is what I discovered:
My PHP.INI file defaults to globals = OFF.
After reading the following comment in the PHP.INI file
; - register_globals = Off
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables). Instead of using $foo, you must use
; $HTTP_POST_VARS["foo"], $HTTP_GET_VARS["foo"], $HTTP_COOKIE_VARS["foo"],
; $HTTP_ENV_VARS["foo"] or $HTTP_SERVER_VARS["foo"], depending on which kind
; of input source you're expecting 'foo' to come from.
I tried the changing the posttest.php code as follows:
<?php
global $name;
echo "$name"; // empty.
?>
The above code still failed to display my POST value. However, the code below works:
<?php
echo $HTTP_POST_VARS["name"]; //works!
?>
I perfer the $HTTP_POST_VARS method because it will work regardless of the value of globals in PHP.INI. Plus, it kind of self documents the source of the data.
I very much appreciate all of the replies.
Kevin