Before you ask PHP questions, try and take a look at
www.PHP.net
But... heres what you would need to do:
[code]
<?php
$filename = $_(post/get)[(whatever they put in the form)] . ".php";
if (file_exists($filename)) {
echo "<p class=\"error\">File Already Exist</p>";
} else {
if (!$handle = fopen($filename, 'a')) {
echo "<p class=\"error\">There was an error</p>";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($filename, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
}
?>
[\code]
Its that or something extremely close.

That script I just gave you does not write the .txt file just so you know. This is just a vague idea of what you need to write. Visit
www.php.net and read some of the documentation. Its a great php learning thing. Also try and buy a few reference manuals (books on PHP) off of
www.half.com .