create-Article-controller Implementation

This commit is contained in:
NOrtmann1
2026-05-26 17:43:07 +02:00
parent 5bcb64f7f8
commit 8c769ba280
3 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ class FileDatabase implements databaseDAO {
$newData = fopen("articles.txt", "xb");
fclose($newData);
}
$previousData = file_get_contents("gaestebuch.txt");
if (file_put_contents("gaestebuch.txt", "$newData\n$previousData")) {
$previousData = file_get_contents("articles.txt");
if (file_put_contents("articles.txt", "$newData\n$previousData")) {
// TODO: Vernünftige Rückmeldung implementieren.
echo "Artikel erfolgreich gespeichert!";
} else {