Forum Moderators: coopster
1. load file into a text area box
2. edit text
3. save text
1.
The text field is simple enough, just use a form and a textarea. To get the file in the box, I recommend file_get_contents(). Something like this should do:
<form method="POST" action="update.php">
<p><textarea name="file" cols=50 value="<?php file_get_contents("myfile.txt");?>"></textarea></p>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
2.
Change whatever you want in the box.
3.
In the resulting script(update.php), use file_put_contents():
<?php
file_put_contents("myfile.txt", $_POST['file']);
?>
Hope it helps.