Either follow Mike Fast's suggestion and check your PHP.ini file to make sure
register_globals = on;
(which is what makes it possible to access variables from GET, POST, SESSION data just by using their names) or add the following to the beginning of your foo.php3 script:
<?
track_vars; // Turns on variable tracking in
...
?>
which "enables the $HTTPVARS[] arrays, where is one of ENV, POST, GET, COOKIE or SERVER."
Then use
$HTTP_POST_VARS["name"]
in place of
$name
This will work regardless of the register_globals setting. And there are advantages/disadvantages to both methods.
With register_globals, it is possible to pass variable data not intended by the script writer (i.e., you can kinda "spoof" the script by adding "?var=value" to the end of the URL to the file), and if the script isn't carefully structured, this could exploit security issues. On the other hand, register_globals makes it far easier to write your code, since you just use simple variable names and don't think about how the information is transferred. Also be sure to read up on gpc_order if you use register_globals.
With HTTPVARS[] arrays, you know EXACTLY which value you're getting, as opposed to register_globals, which relies on gpc_order to determine which variable takes precedence in cases where, for example, a form POSTs a variable named "name" and the URL contains a GET variable named "name"...only one can be in the global name space. The downside, of course, is that using HTTPVARS[] takes much longer to write and doesn't "read" as well.