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