add lang form to function constructCustomerMessage
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 59s
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 59s
This commit is contained in:
parent
360f65fe91
commit
393e65c96c
2 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue