URGENT write varible flash to text file

hi,
i’m having a problem writing from flash on a localhost apache server to a text file, all i want to do is catch one varible called email, so it makes up a list in the text file.

i’m in a real rush to get this done so any help is very appericated.

my as code is


submit.onPress = function() {
	loadVariablesNum ("write.php", 0, "POST");
}

and php code is


<? 
$email = $_POST['email'];
if($REQUEST_METHOD == 'POST'){ 
$file = "textdata.txt"; 
$fp = fopen($file, "a+"); 
fwrite($fp, $_POST['email'] . "
");fclose($fp); 
} 
?>