Hi i am using the html dropdown's onchange event using ajax

In the code i am using, should get the address column value when i change the 
drop down.

but it is not working.What may have gone wrong?

here is the code 

```
<html>
<head>
  <script>
     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 && xmlhttp.status == 200 ) {
               document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
           }
        }
        xmlhttp.open("GET", "getuser.php?q=" + str, true);
        xmlhttp.send();
     }
   </script>
</head>
<body>

<form>    
  <?php
     mysql_connect('localhost', 'tiger', 'tiger');
     mysql_select_db('theaterdb');
     $sql = "select theater_name from theater;";
     $result = mysql_query($sql);
     echo "<select name='theater_name' id='course' onchange='showUser(this.value);'>";
     while ( $row = mysql_fetch_array( $result ) ) {
        echo "<option value='" . $row['theater_name'] ."'>" . $row['theater_name']. "</option>";
     }
     echo "</select>";
?>

</form>

<br>
<div id="txtHint"><b>Info</b></div>
</body>
</html> 

```

Code for getuser.php

```
<?php
   $q = $_GET["q"];
   $con = mysqli_connect("localhost", "tiger", "tiger", "theaterdb");
   if ( !$con ) {
      die('Could not connect: ' . mysqli_error( $con ) );
   }

   mysqli_select_db( $con );
   $sql = "SELECT address FROM theater WHERE theater_name = '".$q."'";

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

   echo "<table border='1'>
     <tr>
        <th>Firstname</th>
     </tr>";

     while( $row = mysqli_fetch_array( $result ) ) {
       echo "<tr>";
          echo "<td>" . $row['address'] . "</td>";
       echo "</tr>";
    }
  echo "</table>";
  mysqli_close($con);
?> 

```