this works now

This commit is contained in:
awesomeuser 2023-08-01 22:05:45 +00:00
parent 8514c2d45b
commit 4877a6488e

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>furpSocial</title>
<title>furpsocial</title>
<meta charset="UTF-8">
<style>
:root {
@ -42,10 +42,10 @@
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
if (false) {
fwrite($myfile, "anon: " . htmlspecialchars($_POST["body"]) . "<br>");
} else {
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
fwrite($myfile, htmlspecialchars($_POST["signature"]) . ": " . htmlspecialchars($_POST["body"]) . "<br>");
} else {
fwrite($myfile, "anon: " . htmlspecialchars($_POST["body"]) . "<br>");
}
fclose($myfile);