jQuery Selects Plugin, pull variables from database
<p>I'm using this code to be able to generate an dynamic select:
demo: <a href="http://www.erichynds.com/examples/jquery-related-selects" rel="nofollow">http://www.erichynds.com/examples/jquery-related-selects</a>
code: <a href="https://github.com/ehynds/jquery-related-selects" rel="nofollow">https://github.com/ehynds/jquery-related-selects</a></p>

<p>I have changed the code of the orignal script from:</p>

<pre><code>$counties = array();
$counties['1']['BARN'] = 'Barnstable';
$counties['1']['PLYM'] = 'Plymouth';
$counties['2']['CHIT'] = 'Chittenden';
$counties['3']['ANDE'] = 'Anderson';
</code></pre>

<p>To</p>

<pre><code>$counties = array();
$sql = "SELECT
        id,
        naam,
        klant_id
        FROM contactpersoon
        ORDER BY klant_id ASC ";

if(!$res = mysql_query($sql,$con))
{
    trigger_error(mysql_error().'&lt;br /&gt;In query: '.$sql);
}
else
{
    while ($row = mysql_fetch_array($res))
    {
        $counties[$row['klant_id'][$row['id'] =  htmlentities($row['naam']); 
    }
}
</code></pre>

<p>But for some reason the pulldown select list is not created when the changes are made.
When I test the query, no errors shown.</p>
