如何将表单/ textarea保存到没有文件扩展名PHP的文件

I am trying to pull a file in a textarea, edit it, then save the edited data to the same file. The submit function seems to go off, it posts the data, and in javascript console it returns the message "couldn't write values to file!", and in the original text area where it pulled the text from, it blanks out that file as if it overwrote the file with no information.

Am I using the wrong ID for my $data? (Textarea ID is edit, am presuming the information is coming from there).

I've used this same save setup on other .html pages, and am wondering if it is because I am saving to a file that has no file extension. If that is the issue, is there a way around that?

Maybe there is an issue elsewhere?

Snippet from my HTML page of the form area:

<form name="editorarea" method="post" action="/my/site/address/here/revotestingpdsave.php">
<textarea id="edit" style="width: 800px; height: 800px;">
<?php 
$filevar = "/my/site/address/here/revotesting/actions";
$handle = fopen($filevar, "r");
$contents = fread($handle, filesize($filevar));
fclose($handle);

echo $contents;
?>
</textarea><p><input class="Save Button" type="submit" name="Save" value="Save" id="submit"></form></p></center>

And this is My Save Form PHP:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$data = $_POST['edit'];
if(get_magic_quotes_gpc()){
$data = stripslashes($data);}
$filevar = "/my/site/address/here/actions";

$fp = fopen($filevar, "w") or die("Couldn't open $file for writing!");
fwrite($fp, $data) or die("Couldn't write values to file!"); 

fclose($fp); 
echo "Saved to $filevar successfully!";

}
?>
<?php
// If this file is not on the server touch() will create it for you
$target = "/my/site/address/here/revotesting.cfg"; 
touch($target);
?>

$_POST['edit'] is being sent empty, then it's being written to the file making it empty, just add name attribute to the textarea, like this:

<textarea id="edit" name="edit" style="width: 800px; height: 800px;">

to display the successful message on the same page just move the revotestingpdsave.php content to the same page so

<form method="post">
// rest of form
</form>

<?php 
if(isset($_POST['edit'])) {
// add revotestingpdsave.php content here
}
?>