<?php $script_charset = 'windows-1251'; $file = './note.txt'; if ( isset($_POST['text']) ) { $text = (string)@$_POST['text']; file_put_contents($file,$text); } else $text = @file_get_contents($file); ?> <!doctype html> <html> <head> </head> <body> <form method="POST" action=""> <textarea cols="45" rows="15" name="text"><?php echo htmlspecialchars($text); ?></textarea> <br><input type="submit" value="сохранить"> </form> </body> </html>