Well im new to this too but first you would need to open the file, for reading and writeing
$fp = fopen("file.txt","r+");
you could read all the contents like this
$contents = fread($fp, filesize("file.txt"));
To get it into a text field coulent you maybe someting like
echo "<input type=\"text\" name=\"edit\" value=\"".$contents.">";
Im new to php so I could be wrong, someone corectme.