if(xmlhttp) {
var txtname = document.getElementById("txtname");
var number = document.getElementById("number");
xmlhttp.open("POST","testing.php",true); //calling testing.php using POST method
xmlhttp.onreadystatechange = handleServerResponse;
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send("txtname=" + txtname.value); //Posting txtname to PHP File
xmlhttp.send("number=" + number.value); //Posting number to PHP File
}
|