Remembering the value of a option box
<p>The following code produces a dynamic dropdown box.</p>

<pre><code>&lt;select name="parent"&gt;
    &lt;?php 
    $q = $admindb-&gt;getParentCategories();
    while($row=mysql_fetch_assoc($q)){
        $title=$row['title'];
        $catid=$row['id'];
        ?&gt;
        &lt;option value="&lt;?php echo $catid; ?&gt;"&gt;&lt;?php echo $title; ?&gt;&lt;/option&gt;
        &lt;?php
    }   
    ?&gt;
&lt;/select&gt;
</code></pre>

<p>However, if the form is returned to the user with validation errors,
I need the box to remember the previous selection..</p>

<p>When using a text box, I have used the following code to remember the entry..</p>

<pre><code>&lt;input type="text" name="title" value="&lt;?php echo $form-&gt;value("title"); ?&gt;"&gt;
</code></pre>

<p>How would I add what is in that value tag to the select code?</p>

<p>Thanks</p>
