Html select tag issue
<p>There are two field in my form.  </p>

<p>1) Html select field item ( From mysql database)<br>
2) Name box.  </p>

<p>If a user select a item from html select tag and forgot to write his/her name then with php it's say..</p>

<pre><code>* Your username required
</code></pre>

<p>BUT then it's doesn't show the select item which user <strong>selected</strong>.. it's show again <strong>Select...</strong> That's why another error message appear..  </p>

<pre><code>* Please select your item.
</code></pre>

<p>How do i show this selected item with php?</p>

<p><strong>Html form:</strong></p>

<pre><code>&lt;tr&gt;    
&lt;td&gt;Class&lt;/td&gt;
&lt;td&gt;
&lt;select class="td" name="class"&gt;
    &lt;option selected="selected" value=""&gt;Select..&lt;/option&gt;
    &lt;?php
    include_once("../../toplevel/content/manage/dbcon/dbcon.php");
    $sql = mysql_query("SELECT * FROM class");
    while($re = mysql_fetch_array($sql))
    {
$re_class = mysql_real_escape_string(trim($re['c_name']));      
        echo "&lt;option value='$re_class'&gt; $re_class &lt;/option&gt;";
    }
    ?&gt;  
&lt;/select&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;&lt;input type="text" value="&lt;?php if(isset($_POST['uname'])) echo 
$_POST['uname']; ?&gt;" name="uname" class="td" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
</code></pre>

<p>I can do this for Name filed But how do i do this for the select field ?<br>
Thanks a lot.<br>
Shibbir</p>
