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; ?>