title: jquery live search from mysql database?
body: <p>in SO you can search for tags without pressing enter.</p>
  
  <p>i want to know:</p>
  
  <ul>
  <li>are the tags retrieved from the database or from a XML file?</li>
  <li>is ajax involved?</li>
  </ul>
  
  <p>i am new at front end. if ajax is involved. how should i write the code?</p>
  
  <p>i want it to access a php file which returns the data. but im not familiar with how it works practically.</p>
  
  <p>should the code look something like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;script type="text/javascript"&gt;
  function ajaxFunction()
  {
  var xmlhttp;
  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)
  {
  document.myForm.time.value=xmlhttp.responseText;
  }
  }
  xmlhttp.open("GET","time.php",true);
  xmlhttp.send(null);
  }
  &lt;/script&gt;
  
  &lt;form name="myForm"&gt;
  Name: &lt;input type="text" name="username" onkeyup="ajaxFunction();" /&gt;
  Time: &lt;input type="text" name="time" /&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>how do i send the text the user typed after he released the key to php? and how should i return the values after php has fetched the tags with SELECT. echo?</p>
  
  <p>plz guide me a little. im so confused when front end is involved.</p>