Update index.php

This commit is contained in:
awesomeuser 2023-08-01 21:22:34 +00:00
parent ba6f448566
commit aa6b4d4896

View file

@ -40,11 +40,10 @@
<?php
// write to file
if (!is_null($_POST["body"])) {
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
fwrite($myfile, $_POST["signature"] . ": " . $_POST["body"] . "<br>");
fclose($myfile);
}
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
fwrite($myfile, $_POST["signature"] . ": " . $_POST["body"] . "<br>");
fclose($myfile);
// read from file
$myfile = fopen("posts.txt", "r") or die("Unable to open file! (r)");