add lang form to function constructCustomerMessage
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 59s

This commit is contained in:
bettina 2024-06-27 07:44:08 +02:00
commit 393e65c96c
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ mb_internal_encoding("UTF-8");
try {
// Receive and validate input data using filter_input()
$name = strip_tags(trim(filter_input(INPUT_POST, 'name') . ' ' . filter_input(INPUT_POST, 'vorname'))); // Add filter_input(INPUT_POST, 'nachname') to $name
$lang = $lang = ( isset($_POST['sprache']) && $_POST['sprache'] == "FR" ? "FR" : "DE" );
$lang = ( isset($_POST['sprache']) && $_POST['sprache'] == "FR" ? "FR" : "DE" );
$email = filter_var(trim(filter_input(INPUT_POST, 'email')), FILTER_SANITIZE_EMAIL);
$subject = strip_tags(trim(filter_input(INPUT_POST, 'formularart')));
// Construct the message using the function from message.php
@ -60,7 +60,7 @@ try {
$customerSubject = ($lang == "DE" ? 'Danke für Ihre Bestellung bei der VeruA AG' : 'Merci pour votre commande chez VeruA AG' );
$encodedSubject = mb_encode_mimeheader($customerSubject, "UTF-8", "Q");
$customerMessage = constructCustomerMessage($message);
$customerMessage = constructCustomerMessage($message, $lang);
$mail->clearAddresses();
$mail->addAddress($customerEmail);