diff --git a/index.php b/index.php index 94a0878..8d11db6 100644 --- a/index.php +++ b/index.php @@ -78,13 +78,11 @@ $construct = fread($myfile,filesize("posts.txt")); fclose($myfile); + $signature = "anonymous"; if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) { - $construct = htmlspecialchars($_POST["signature"]) . " [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "
" - . $construct; - } else { - $construct = "anon [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "
" - . $construct; + $signature = htmlspecialchars($_POST["signature"]); } + $construct = $signature . " [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "
" . $construct; // write back into the file $myfile = fopen("posts.txt", "w") or die("Unable to open file!");