title: PHP ajax database : how to pass two variables and get data of them in different div even one?
body: <pre><code>&lt;script&gt;
  function showUser(str)
  {
  if (str=="")
    {
    document.getElementById("txtHint").innerHTML="";
    return;
    }
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
      document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
      }
    }
  xmlhttp.open("GET","getuser.php?q="+str,true);
  xmlhttp.send();
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>this script send one variable to php code and get data from database and put it in div tag,  how can we send two variables and get data in different tags.?</p>