i have this ajax script

    <script type="text/javascript"> 
        var url = "GetAutoData.php?svreg="; // The server-side script 
       function handleHttpResponse() {    
        if (http.readyState == 4) { 
              if(http.status==200) { 
                  var results=http.responseText; 
              document.getElementById('divAutoInfo').innerHTML = results; 

        function requestAutoInfo() {      
            var svreg = document.getElementById("getautomobile").value; 
            http.open("GET", url + escape(svreg), true); 
            http.onreadystatechange = handleHttpResponse; 
function getHTTPObject() { 
  var xmlhttp; 

    xmlhttp = new XMLHttpRequest(); 
  else if (window.ActiveXObject){ 
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    if (!xmlhttp){ 
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
  return xmlhttp; 
var http = getHTTPObject(); // We create the HTTP Object 

with this html script

Automobile #: <input type="text" id="getautomobile" value="" />
<input type="button" value="Get Automobile Info" onclick="requestAutoInfo()" />
<div id="divAutoInfo"></div> 

Am trying to add a secound field "Automobile #2:<input type="text" id="getautomobile2" value="" />" to the html part and send it to mysql through the above ajax script,but am at a lost.Pls help me out...

Try this:

 var svreg = document.getElementById("getautomobile").value;
 var svreg2 = documnet.getElementById('getautomobile2').values;

http.open("GET", url + escape(svreg) + "&param=" + escape(svreg2), true); 

Personally I would use jquery.Jquery makes it realy easy to use ajax.

    $.post('someurl', {param1: $('#id1').val(), param2: $('#id2').val();}).done(function(data){

Im sorry did you not like my answer? It pretty much solves your question? @accra