You need to assign the $name variable like this: $name = $_REQUEST["name"];
also take a look in manual at HTTP POST VARS
and this is straight copy from the same manual (it is a very simple thing to take a look at it):
Request variables: $_REQUEST
Note:
Introduced in 4.1.0. There is no equivalent array in earlier versions.
An associative array consisting of the contents of $GET, $POST, and $_COOKIE.
Note:
Prior to PHP 4.3.0, $FILES information was also included into $REQUEST.
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_REQUEST; to access it within functions or methods.
If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_REQUEST array. For related information, see the security chapter titled Using Register Globals. These individual globals are not autoglobals