I would like to be able to load a file (summary.txt) into a textarea of a form, make changes, and save the changes to the file. I have everything working EXCEPT I must refresh the page after I hit submit. Any suggestions?
<? $stuff = implode("",file("summary.txt"));?>
<form method=post>
<textarea name="mytext" cols="50" rows="20">
<?php echo (htmlspecialchars($stuff)); ?>
</textarea>
<br>
<input type=submit>
</form>
<?php
$file = "summary.txt";
$fp = fopen("$file","w");
fputs($fp, $_POST["mytext"]);
fclose($fp);
?>