Email form

Can somebody help me. I am trying to set up a simple email form in my flash site. The web host is GODaddy. The script below is what they gave me to use. Everything works fine except when I get the email results, the variables I defined in my flash form comes back as undefined. How do I define three variables in this script below. The variables are “name”,“email”, “comments” I’m still struggling with flash. PHP is a whole new mountain for me. Help!!!

<?php
$request_method = $_SERVER[“REQUEST_METHOD”];
if($request_method == “GET”)
{
$query_vars = $_GET;
}
elseif ($request_method == “POST”)
{
$query_vars = $_POST;
}
reset($query_vars);
$t = date(“U”);
$file = $SERVER[‘DOCUMENT_ROOT’] . "\ssfm\gdform" . $t;
$fp = fopen($file,“w”);
while (list ($key, $val) = each ($query_vars))
{
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>
“);
fputs($fp,”$val
“);
fputs($fp,”<GDFORM_VARIABLE NAME=$key END>
");
if ($key == “redirect”)
{
$landing_page = $val;
}
}
fclose($fp);

if ($landing_page != “”)
{
header(“Location: http://”.$_SERVER[“HTTP_HOST”]."/$landing_page");
}
else
{
header(“Location: http://”.$_SERVER[“HTTP_HOST”]."/");
}
?>