I'm putting up a simple text editor for an "about me" website. Here's the basics from the edit page:
<form action="done.php">
<textarea name="new" style="width: 600px; height: 500px;">
<? readfile("about.txt"); ?>
</textarea>
<input type="submit" value="Save" />
</form>
The old text is put into the form, and once it is re-written, it is sent here:
<?
$_POST["save"] = fopen("about.txt", "w");
fwrite($_POST["save"], stripslashes($_REQUEST["new"]));
fclose($_POST["save"]);
?>
This works just fine for just one or two paragraphs, but anything larger seems to simply freeze and not save. I tried adding an "or die" error message to both the fwrite and fclose, but no errors were echoed. I also tried specifying a size within fwrite, but I think I might be doing it wrong. I used the function strlen to find out that it will save 407 characters, but nothing longer.
Thank you for any help or suggestions.