Well, in first place you need a server-side script to handle your form data, lets say PHP.
http://www.scriptingok.com/tutorials-category/PHP-MySQLThen, you need to have in mind that your form will be received on tha same computer that hosts your site. If you are using a remote server, the form will be "read" on the remote server and, in order to get to your local disk you will need to download it.
Now, to summarize, use this PHP script that will create a file called "data.txt" on your server which you can later copy-paste to your local drive:
<?php
extract($_POST);
$filename = 'data.txt'; //you can rename this variable
$content = 'Name: ' . $name . '
Last name: ' . $last . '
Comments: ' . $comments . '
';
$handle = fopen($filename, 'a');
fwrite($handle, $content);
fclose($handle);
<?php
extract($_POST);
$filename = 'data.txt';
$content = 'Name: ' . $name . '
Last name: ' . $last . '
Comments: ' . $comments . '
';
$handle = fopen($filename, 'a');
fwrite($handle, $content);
fclose($handle);
echo '<a href="form_stored_on_a_file.htm">back</a>';
?>
?>
This PHP is for an HTML like the next one. The HTML file is called form_stored_on_a_file.htm and the PHP form_stored_on_a_file.php, both should be on your server and you only need to go to the HTML file.
<body>
<form name="form" method="post" action="form_stored_on_a_file.php">
<label for="name">Name: </label><input name="name" id="name" />
<br /><br />
<label for="last">Last name: </label><input name="last" id="last" />
<br /><br />
<label for="comments">Comments: </label>
<br />
<textarea name="comments" cols="40" rows="5"></textarea>
<br /><br />
<input type="submit" value="Send Data" />
<input type="reset" value="Clear"/>
</form>
</body>
</html>
see also
http://www.scriptingok.com/forum/t5_964-Create-a-file-from-a-textarea