jQuery Autocomplete plugin pengoworks version not working
<p>Hi I am using the jQuery plugin (pengoworks version) and I have a problem...  When I initially type something into the text box it brings up the suggestion box fine.  However, after I type a few letters into the text box, if I pause, and then resume typing it will only filter out, what was populated in the suggestion box beneath, instead of running the query again for new results.  But it WILL rerun the query every time I hit the back key after my initial pause... I hope you can understand what I'm talking about.  Sorry for anything that isn't clear, I am new to programming. I will provide my html page and my php page.</p>

<pre><code> &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;

    &lt;title&gt;&lt;/title&gt;
    &lt;script type="text/javascript" src="jquery-1.7.1.js"&gt;&lt;/script&gt; 
    &lt;script type="text/javascript" src="jquery.autocomplete.js"&gt;&lt;/script&gt;
    &lt;link href="jquery.autocomplete.css" rel="stylesheet" type="text/css" /&gt;


   &lt;script type="text/javascript"&gt;
        $(document).ready(function() {
            $('#input_box').autocomplete("autocomplete_search.php");

        })
    &lt;/script&gt;
   &lt;/head&gt;

    &lt;body&gt;

        &lt;input type="text" name="input_box" value="" id="input_box"   /&gt;

    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>here is my PHP part.</p>

<pre><code>    &lt;?php
    include 'fh.inc.db.php';

    $db = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD) or 
    die ('Unable to connect. Check your connection parameters.');
    mysql_select_db(MYSQL_DB, $db) or die(mysql_error($db));

    $location = htmlspecialchars(trim($_GET['q'])); //gets the location of the search

    if(is_numeric($location)) {

       $query = "SELECT
           zipcode_id
       FROM
           user_zipcode
       WHERE
           zipcode_id LIKE '%$location%'
       ORDER BY zipcode_id DESC LIMIT 10";
    $result = mysql_query($query, $db) or die(mysql_error($db));

    } elseif(is_string($location)) {

    $query = "SELECT
            city
        FROM
           user_zipcode
       WHERE
           city LIKE '%$location%'
       ORDER BY city DESC LIMIT 10";
    $result = mysql_query($query, $db) or die(mysql_error($db));


    }


    while($row = mysql_fetch_assoc($result)) {

    extract($row);
    if(is_numeric($location)){
       echo "$zipcode_id \n";
    }elseif(is_string($location)){
       echo "$city \n"; 
    }

    }

   ?&gt;
</code></pre>
