1: 2: 3: 4: 5: 6: 7: 8: 9:
if (xmlhttp) { var txtname = document.getElementById („txtname“); var aantal = document.getElementById („aantal“); xmlhttp.open („POST“, „testing.php“, waar); //calling testing.php gebruikend POSTmethode xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader (het „tevreden-Type“, „application/x-www-vorm-urlencoded“); xmlhttp.send („txtname=“ + txtname.value); //Posting txtname aan PHP Dossier xmlhttp.send („number=“ + number.value); //Posting aantal aan PHP Dossier }
1: 2: 3: 4: 5:
xmlhttp.send („txtname=“ + txtname.value + „&number=“ + number.value); of xmlhttp.send („txtname=“ + encodeURI (txtname.value) + „&number=“ + encodeURI (number.value));