anon update

This commit is contained in:
awesomeuser 2023-08-01 21:41:26 +00:00
parent 238a0ec1cd
commit 0c09aa4059

View file

@ -41,7 +41,13 @@
// write to file // write to file
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) { if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)"); $myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
if (strlen($_POST["signature"]) != 0) {
fwrite($myfile, htmlspecialchars($_POST["signature"]) . ": " . htmlspecialchars($_POST["body"]) . "<br>"); fwrite($myfile, htmlspecialchars($_POST["signature"]) . ": " . htmlspecialchars($_POST["body"]) . "<br>");
} else {
fwrite($myfile, "anon: " . htmlspecialchars($_POST["body"]) . "<br>");
}
fclose($myfile); fclose($myfile);
} }