I have the following code. This is used on my admin panel for administrators to put their notes in so the other admins can read it. I don't want to store this in a database.
The issue is the form is not saving the text in the textarea.
<?php
IF (ISSET($_POST["submit"])) {
$string = '<?php
$notes = "'. $_POST["notes"]. '";
?>';
$fp = FOPEN("includes/notes.php", "w");
FWRITE($fp, $string);
FCLOSE($fp);
echo '<div class="ok">' . $lang["done"] . '</div>';
}
include("includes/notes.php");
?>
<form action="" method="post" id="notesform">
<textarea placeholder="Admin notes" class="notes" id="notes"><?php echo $notes; ?></textarea>
<input type="submit" value="OK">
</form>
What is going wrong? How can I fix this? I have tried most suggestions on Google but it keeps happening!