Added updated RSVP-form
This commit is contained in:
@@ -137,14 +137,14 @@
|
||||
|
||||
|
||||
<li class="navigation-item">
|
||||
<a href="/ru/categories/">🇷🇺</a>
|
||||
<a href="/de/categories/">🇩🇪</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="navigation-item">
|
||||
<a href="/de/categories/">🇩🇪</a>
|
||||
<a href="/ru/categories/">🇷🇺</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Bitte antworten bis <strong>30. Juni</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<p><a href="https://example.com/rsvp-form" target="_blank">RSVP Formular</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Bitte antworten bis <strong>30. Juni</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<form action="/rsvp-submit.php" method="POST">
|
||||
|
||||
<label for="first_name">Vorname:</label><br>
|
||||
<input type="text" id="first_name" name="first_name" required><br><br>
|
||||
|
||||
<label for="last_name">Nachname:</label><br>
|
||||
<input type="text" id="last_name" name="last_name" required><br><br>
|
||||
|
||||
<label>Getränkevorlieben:</label><br>
|
||||
|
||||
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
|
||||
<label for="wine">Wein</label><br>
|
||||
|
||||
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
|
||||
<label for="beer">Bier</label><br>
|
||||
|
||||
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
|
||||
<label for="juice">Saft</label><br><br>
|
||||
|
||||
<label for="allergies">Allergisch auf:</label><br>
|
||||
<input type="text" id="allergies" name="allergies"><br><br>
|
||||
|
||||
|
||||
<input type="text" name="website" style="display:none">
|
||||
|
||||
<button type="submit">Abschicken</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<loc>http://localhost:1313/categories/</loc>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="ru"
|
||||
href="http://localhost:1313/ru/categories/"
|
||||
hreflang="de"
|
||||
href="http://localhost:1313/de/categories/"
|
||||
/>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="de"
|
||||
href="http://localhost:1313/de/categories/"
|
||||
hreflang="ru"
|
||||
href="http://localhost:1313/ru/categories/"
|
||||
/>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
|
||||
+46
-10
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Please respond by <strong>June 30</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<p><a href="https://example.com/rsvp-form" target="_blank">RSVP Form</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Please respond by <strong>June 30</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<form action="/rsvp-submit.php" method="POST">
|
||||
|
||||
<label for="first_name">First name:</label><br>
|
||||
<input type="text" id="first_name" name="first_name" required><br><br>
|
||||
|
||||
<label for="last_name">Last name:</label><br>
|
||||
<input type="text" id="last_name" name="last_name" required><br><br>
|
||||
|
||||
<label>Drink preferences::</label><br>
|
||||
|
||||
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
|
||||
<label for="wine">Wine</label><br>
|
||||
|
||||
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
|
||||
<label for="beer">Beer</label><br>
|
||||
|
||||
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
|
||||
<label for="juice">Juice</label><br><br>
|
||||
|
||||
<label for="allergies">Allergic to:</label><br>
|
||||
<input type="text" id="allergies" name="allergies"><br><br>
|
||||
|
||||
|
||||
<input type="text" name="website" style="display:none">
|
||||
|
||||
<button type="submit">Send</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
|
||||
exit("Invalid request");
|
||||
}
|
||||
|
||||
/* Honeypot spam protection */
|
||||
if (!empty($_POST['website'])) {
|
||||
exit; // silently drop bot submission
|
||||
}
|
||||
|
||||
/* Safely read form fields */
|
||||
$first_name = htmlspecialchars($_POST['first_name'] ?? '');
|
||||
$last_name = htmlspecialchars($_POST['last_name'] ?? '');
|
||||
|
||||
$drinks = isset($_POST['drinks']) ? implode(", ", $_POST['drinks']) : "None";
|
||||
$allergies = htmlspecialchars($_POST['allergies'] ?? '');
|
||||
|
||||
if (!$first_name || !$last_name) {
|
||||
exit("Missing required fields");
|
||||
}
|
||||
|
||||
/* Email setup */
|
||||
$to = "hochzeit@markinstefan.xyz";
|
||||
$subject = "New Wedding RSVP from $first_name $last_name";
|
||||
|
||||
$message = "Name: $first_name $last_name\n";
|
||||
$message .= "Drinks: $drinks\n";
|
||||
$message .= "Allergies: $allergies\n";
|
||||
|
||||
$headers = "From: no-reply@yourdomain.com\r\n";
|
||||
$headers .= "Reply-To: no-reply@yourdomain.com\r\n";
|
||||
|
||||
/* Send mail */
|
||||
mail($to, $subject, $message, $headers);
|
||||
|
||||
echo "Thank you! Your RSVP has been sent.";
|
||||
?>
|
||||
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Пожалуйста, ответьте до <strong>30 июня</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<p><a href="https://example.com/rsvp-form" target="_blank">Форма RSVP</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="section rsvp">
|
||||
<h2>📝 RSVP</h2>
|
||||
|
||||
<p>Пожалуйста, ответьте до <strong>30 июня</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<form action="/rsvp-submit.php" method="POST">
|
||||
|
||||
<label for="first_name">Имя:</label><br>
|
||||
<input type="text" id="first_name" name="first_name" required><br><br>
|
||||
|
||||
<label for="last_name">Фамилия:</label><br>
|
||||
<input type="text" id="last_name" name="last_name" required><br><br>
|
||||
|
||||
<label>Предпочтения по напиткам::</label><br>
|
||||
|
||||
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
|
||||
<label for="wine">Вино</label><br>
|
||||
|
||||
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
|
||||
<label for="beer">Пиво</label><br>
|
||||
|
||||
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
|
||||
<label for="juice">Сок</label><br><br>
|
||||
|
||||
<label for="allergies">Аллергия на:</label><br>
|
||||
<input type="text" id="allergies" name="allergies"><br><br>
|
||||
|
||||
|
||||
<input type="text" name="website" style="display:none">
|
||||
|
||||
<button type="submit">Отправить</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user