Javacript for validating select box
<pre><code>&lt;select name="fruits"&gt;
   &lt;option value="apple"&gt;Apple&lt;/option&gt;
   &lt;option value="orange"&gt;Orange&lt;/option&gt;
   &lt;option value="pears"&gt;Pears&lt;/option&gt;
&lt;/select&gt;

/* fruits stored in the database */
&lt;?php  $items as $each_fruit) {
   $fruit_count++;
   $a[]=$each_fruit-&gt;fruit_name;
?&gt;
</code></pre>

<p>The selected values are already stored in the database. I don't want to allow to add the fruit again....</p>

<p>How can I check that using javascript? </p>
