<?php
if (isset($_POST['mes'])){
$file=fopen('mes.txt','w+');
fputs($file,$_POST['mes']);
fclose($file);
echo 'Успешно';
}
?>
<html>
<head>
<title>myform</title>
</head>
<body>
<form method="post">
<p>
<textarea name="mes" cols="50" rows="5" class="lnews_data"></textarea>
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="отправить">
</label>
</p>
</form>
</body>
</html>