From 3ea23ed190c758a26355baf90863000ff7db0624 Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Tue, 1 Aug 2023 23:42:38 +0000 Subject: [PATCH] yup --- index.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/index.php b/index.php index 31c517e..86ff299 100644 --- a/index.php +++ b/index.php @@ -77,29 +77,28 @@ " . $construct; + $content = $signature . " [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "
" . $construct; - // write back into the file + // write string back into the file $myfile = fopen("posts.txt", "w") or die("Unable to open file!"); - fwrite($myfile, $construct); + fwrite($myfile, $content); fclose($myfile); } - // read from file - $myfile = fopen("posts.txt", "r") or die("Unable to open file!"); - echo fread($myfile,filesize("posts.txt")); - fclose($myfile); + // show content + echo $content; ?>