Initial commit: Modernes Harry Potter Escape Quiz Portal (FastAPI & MariaDB)

This commit is contained in:
kobold-ai
2026-09-21 11:29:18 +02:00
commit c3a21369ef
50 changed files with 3346 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
async function send() {
const frage = document.getElementById("frage").value.trim();
const antwort = document.getElementById("antwort").value.trim();
const tipp = document.getElementById("tipp").value.trim();
if (!frage || !antwort) {
alert("Bitte mindestens Frage und Antwort ausfüllen.");
return;
}
const payload = {
frage: frage,
antwort: antwort,
tipp: tipp
};
const res = await fetch("save_vorschlag.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
});
if (res.ok) {
alert("Danke! Dein Vorschlag wurde gespeichert.");
document.getElementById("frage").value = "";
document.getElementById("antwort").value = "";
document.getElementById("tipp").value = "";
} else {
alert("Fehler beim Speichern. Bitte später erneut versuchen.");
}
}