Hi nem,
remove the " chars around $_POST:
if (isset($_POST['name']) && $_POST['name'] != "") {
$filename = "filename and directory";
$content = $_POST['name'];
if ($fd = fopen ($filename,"a+")) {
fwrite ($fd, $content) ;
fclose ($fd);
} else {
echo "error opening file $filename<br>\n";
}
}
Besides that there were several other errors in your code.
Using a+ with fopen appends the value of $content to the file, using w+ overwrites the file.
Thomas