Senden mehrerer Kontrollkästchenwerte über PHPmailer
Posted: 29 Dec 2024, 12:08
Sobald ich auf die Schaltfläche „Senden“ klicke, wurde die E-Mail gesendet. Anstatt jedoch ausgewählte Werte zu senden, sendet es jeden Wert in der Liste. Ich kann nicht finden, was mir fehlt. Bitte schlagen Sie vor.
Soweit ich gesehen habe, ist darin kein Fehler aufgetreten. Aber ich denke, das Problem liegt im Kommunikationsteil.
Erstellt mit
[*]HTML
[*]Javascript
[*]jQuery
[*]PHP
[*]PHPMailer
Bitte schlagen Sie eine Lösung vor.
Comm.php
< div class="snippet">
Soweit ich gesehen habe, ist darin kein Fehler aufgetreten. Aber ich denke, das Problem liegt im Kommunikationsteil.
Erstellt mit
[*]HTML
[*]Javascript
[*]jQuery
[*]PHP
[*]PHPMailer
Bitte schlagen Sie eine Lösung vor.
Code: Select all
var address = document.getElementById('faddress');
var optiona = document.getElementById('optiona');
var optionb = document.getElementById('optionb');
var optionc = document.getElementById('optionc');
var optiond = document.getElementById('optiond');
var optione = document.getElementById('optione');
var optionf = document.getElementById('optionf');
var optiong = document.getElementById('optiong');
var optionh = document.getElementById('optionh');
var optioni = document.getElementById('optioni');
var optionj = document.getElementById('optionj');
var sectiona = document.getElementById('sectiona');
function checkErrors(){
var error_count = 0;
if(error_count == 0){
document.getElementById('container').innerHTML = "Thank YouWe will get back to you shortly.
[url=https://www.google.co.uk/]
[img]viewsite.png[/img]
[/url] ";
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if(this.responseText == "OKAY"){
}
}
};
xhttp.open("GET", "comm.php? address="+address.value+"&optiona="+optiona.value+"&optionb="+optionb.value+"&optionc="+optionc.value+"&optiond="+optiond.value+"&optione="+optione.value+"&optionf="+optionf.value+"&optiong="+optiong.value+"&optionh="+optionh.value+"&optioni="+optioni.value+"&optionj="+optionj.value+"§iona="+sectiona.value);
xhttp.send();
}
}
document.getElementById("submit_button").addEventListener("click", function(){
checkErrors();
});
Code: Select all
Comm.php
< div class="snippet">
Code: Select all