Update index.php
This commit is contained in:
parent
e868d161df
commit
7afbe7115c
1 changed files with 3 additions and 5 deletions
|
@ -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"]) . "<br>"
|
||||
. $construct;
|
||||
} else {
|
||||
$construct = "anon [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "<br>"
|
||||
. $construct;
|
||||
$signature = htmlspecialchars($_POST["signature"]);
|
||||
}
|
||||
$construct = $signature . " [UTC " . date("m/d/Y H:i") . "] " . htmlspecialchars($_POST["body"]) . "<br>" . $construct;
|
||||
|
||||
// write back into the file
|
||||
$myfile = fopen("posts.txt", "w") or die("Unable to open file!");
|
||||
|
|
Reference in a new issue