This commit is contained in:
Robert
2023-11-10 15:18:31 +01:00
parent 9382b6375a
commit 09d786ea9b

View File

@@ -8,7 +8,9 @@
include "gerichte.php";
$besucherCount = 0;
$newletterCount = 0;
//Besucher counter
if (file_exists("besucher.txt")) {
$besucherFile = fopen("besucher.txt", "r");
$besucherCount = fgets($besucherFile) + 1;
@@ -22,6 +24,12 @@ if (file_exists("besucher.txt")) {
fclose($besucherFile);
}
//Newsletter counter
$newletterCount++;
$newsFile = fopen("newletter.txt", "w");
fwrite($newsFile, $newletterCount);
fclose($newsFile);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$name = $_POST['name'];
$email = $_POST['email'];