what is the function of attribute selected in combo box while fetching data from MYSQL in php <p>Hello i am beginner in PHP. I am trying to fetch data from MYSQL and want to show in combo box but if user does not re selects the item from item list it highlights error that nothing is selected. Is there any php function to do this particular task ? I want that when the data of particular id is loaded in form and if without making any change in combo boxes data user cliks on submit then it must submit but in my case it shows that the fields are empty while data is here. Here is my Code</p> <pre><code>&lt;li id="foli3" class="notranslate "&gt; &lt;label class="desc" id="title3" for="Field3"&gt; what is the current occupation of your guardian? &lt;span id="req_3" class="req"&gt;*&lt;/span&gt; &lt;/label&gt; &lt;span&gt; &lt;select id="Field3" name="occupation" class="field select addr" tabindex="8" required &gt; &lt;option value="" selected="selected"&gt;&lt;?php echo $rows['occupation']; ?&gt;&lt;/option&gt; &lt;option&gt;Private Sector Employee&lt;/option&gt; &lt;option&gt;Social Sector Employee&lt;/option&gt; &lt;option&gt;Agriculturalist&lt;/option&gt; &lt;option&gt;Businessman&lt;/option&gt; &lt;option&gt;Government Employee&lt;/option&gt; &lt;option&gt;Other&lt;/option&gt; &lt;/select&gt; &lt;/span&gt; &lt;/li&gt; </code></pre>