PHP AJAX MySQL查询问题

I am trying to query my MySQL DB with AJAX. The html table gets built but the MySQL data is not displaying. I am not sure what I am missing. I have 2 files. So far this is what I have:

ajax1.html

<html>
<head>
<script>
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}

xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.send();
}
</script>
</head>
<body>

<form>
<select name="users" onchange="showUser(this.value)">
<option value="">Select a person:</option>
<option value="1">612</option>
<option value="2">614</option>
<option value="3">640</option>
<option value="4">641</option>
</select>
</form>
<br>
<div id="txtHint"><b>Results</b></div>

</body>
</html>

and getuser.php

<?php
$q = intval($_GET['q']);

$con = mysqli_connect('localhost','root','password','data');
if (!$con)
{
   die('Could not connect: ' . mysqli_error($con));
}

mysqli_select_db($con,"data");
$sql="SELECT * FROM tech_info WHERE Tech_Num = '".$q."'";

$result = mysqli_query($con,$sql);

echo "<table border='1'>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Tech Number</th>
<th>Mobile Number</th>
</tr>";

while($row = mysqli_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['Tech_F_Name'] . "</td>";
  echo "<td>" . $row['Tech_L_Name'] . "</td>";
  echo "<td>" . $row['Tech_Num'] . "</td>";
  echo "<td>" . $row['Mobile_Num'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysqli_close($con);
?> 

It's better to use jquery instead of javascript for ajax.Here is code of jquery for AJAX. Don't forget to add js in your scirpt.

<script> 
function showUser(str) {
var datastring ='?q='+str; 
$.ajax({ 
          type:'POST',
          url : 'getuser.php'
          data:datastring,
          success:function(msg)
          {
              alert(msg);
          }  
});
}
</script>