Sorry to be picky, but that script involves some practices that are best avoided, I think:
if($_REQUEST['submit'])
I've only recently discovered how that doesn't work. The handling of "submit" buttons varies between browsers and is not guaranteed. If the submit button is the default action on the form, and rather than press the button, the end user hits "enter", the form is submitted without the button being clicked. Many browsers will ONLY send the submit/value pair, if the button has been
clicked. Therefore, to test whether a form has been submitted, it is much better to include a hidden form element that contains a name/value pair that you check for. The hidden element will always be sent with the GET/POST variables.
$post_data = $_SERVER["DOCUMENT_ROOT"]."root to text file here";
DOCUMENT_ROOT is not very portable, since its handling seems to varying according to the O/S PHP is installed on.
$data = fopen($post_data, "r");
$read = fread($data, filesize($post_data) );
fclose($data);
print <<<EOF
Very bad indeed - no checking for special characters, no parsing of HTML, etc. Could end up with a very screwed up edit page.
<textarea name="post" cols="35" rows="15">{$read}</textarea>
The "{}" syntax can be specific to a templating system. "<?php echo $read; ?>" is recommended.
Then, to have the .txt file show up on your website, simply use <? include("filename.txt") ?>
The "<? ?>" short form is not guaranteed, and depends on php.ini settings. For maximum portability, you should always use "<?php ?>".