It look like you're getting the name field from the PHP $_POST variable. But your example passes the name field as a GET parameter.
To fix this, you have two options. If you only want to allow name to be passed as a GET parameter, then you need to do this:
$name = $_GET["NAME"];
If you want to allow name to be passed as either a GET or a POST parameter, you can do this:
$name = $_REQUEST["NAME"];