<html>
<head>
<title></title>
</head>
<body>
<script>
function showHint(str)
{
var xmlhttp;
if (str.length==0)
  { 
  document.getElementById("user").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 && xmlhttp.status==200)
    {
    document.getElementById("user").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","getuser.php?user="+str,true);
xmlhttp.send();
}
</script>

show in single row<br/>
<input type="text" name="inputbox" id="inputbox" onkeyup="showHint(this.value);"><br/>
<span id="user">Result will show here</span><br/><br/>

<script>
function showtable(str)
{
var xmlhttp;
if (str.length==0)
  { 
  document.getElementById("usertable").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 && xmlhttp.status==200)
    {
    document.getElementById("usertable").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","gettable.php?user="+str,true);
xmlhttp.send();
}
</script>

show in table<br/>
<input type="text" name="inputbox2" id="inputbox2" onkeyup="showtable(this.value);"><br/>
<span id="usertable">Result will show here</span>

<script>
function validatet(str1,str2)
{
var xmlhttp;
if (str1.length==0)
  { 
  document.getElementById("userlogin").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 && xmlhttp.status==200)
    {
    document.getElementById("userlogin").innerHTML=xmlhttp.responseText;
    }
  }
//var i = document.getElementById("memID").value;
//var j = document.getElementById("password").value;
var datas = "user="+str1+"&password="+str2;
xmlhttp.open("GET","getvalidate.php?" + datas,true);
xmlhttp.send();
}
</script>

Login<br/>
<input type="text" name="memID" id="memID" onkeyup="validatet(memID.value,password.value);"><br/>
<input type="password" name="password" id="password" onkeyup="validatet(memID.value,password.value);"><br/>
<span id="userlogin">Result will show here</span>

</body>
</html>

