Здравствуйте.
У меня возникла такая же проблема, но в отличии от уже решенной задача, мне нужно ввести название файла и потом его редактировать.
К сожалению, когда я пишу ваш код, у меня выдаются ошибки. Как можно их решить?\
Заранее спасибо.

Код:
<html>
<body>
<form action=index_first.php method=POST>
<input type="submit" name="back" value="Home">
</form>
<form action=xml.php method=POST>
<input type="submit" name="back" value="Back">
</form>
<form action=editxml.php method=POST>
<input type=text name="filename" value='<?php echo $_POST ['filename'];?>' SIZE=50><BR>
<textarea name="textbox" rows=20 cols=100>
<?
if(isset($_POST["textbox"]))
{
$file=$_POST["filename"];
file_put_contents($file, $_POST["textbox"]);
}
if (isset($_POST["send"]))
{
$file=$_POST["filename"];
echo file_get_contents($file);
}
//"C:/Program Files/TopServer 2.1/home/localhost/UIR-php/fr1.xml"
?>
</textarea>
<input type=submit name="send" value="Input">
</form>
А ошибка следующая:

Код:
<br />
<b>Notice</b>: Undefined index: filename in <b>T:\home\localhost\UIR-php\editxml.php</b> on line <b>13</b><br />
124127