Dynamic drop down list!
<p>I have edited the question as what I said before was two pieces of code together.</p>

<p>I have the following code:</p>

<pre><code>        $f = "SELECT * FROM ".TBL_FIXTURES." WHERE compname =  '$_POST[league]' AND home_user = '$_SESSION[username]' ORDER BY away_user";
    $fixtures = mysql_query($f);
    ?&gt;
    &lt;?
    while( $row = mysql_fetch_assoc($fixtures))
    {
        extract($row);
        $info = explode("_",$row[compname]);    
        ?&gt;  


        &lt;select name="hu" class="combo"&gt;
            &lt;option value="&lt;? echo $home_user ?&gt;"&gt;&lt;? echo $home_user?&gt;&lt;/option&gt;
        &lt;/select&gt;       
        &lt;select name="au" class="combo"&gt;
        &lt;?php
        while( $row = mysql_fetch_assoc($fixtures))
        {
            $u=$row['away_user'];
            echo "&lt;option value=\"$u\"&gt;$u&lt;/option&gt;";
        }
        ?&gt;
        &lt;/select&gt;
        &lt;?

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

<p>As you can see, there are two while loops. But the first value from the dropdown list for away_user is missing. If i remove the first loop, it appears but the drop down for home_user disappears. How can i get around this?</p>

<p>THanks</p>
