displaying results based on combobox selection
<p>I have a dynamic combobox and I have my Fetch button. When a user selects a value from combobox and clicks fetch button, all the other related values are displayed in a textbox for the user to edit and update records. And that works fine.</p>

<pre><code>&lt;form id="form1" method="post" action="edit.php"&gt;   
  &lt;select name="ID" id="select"&gt;
     &lt;?php display_Id();?&gt;
  &lt;/select&gt; 
  &lt;input type="submit" name="Fetch" id="Fetch" value="Fetch" /&gt;
&lt;/form&gt;

function display_Id() {
    $query = "SELECT * FROM Flight";

    $result = mysql_query($query) or die("Failed to fetch records");
    confirm_query($result);

    while($rows = mysql_fetch_array($result)) {
        $flightNum = $rows['FlightNo'];
        echo "&lt;option value=\"$flightNum\" ";
        echo " selected";
        echo "&gt; $flightNum &lt;/option&gt;";
    }       
}
</code></pre>

<p>The problem is in the Fetch button. When user clicks Fetch, other values are displaying but the selected value from combobox is refreshing. How to make the values remain selected even after pressing the Fetch button?</p>
