title: restrict output of same values on dropdown
body: <pre><code>$dept = $_POST['dept'];
  $sql2 = "SELECT batch FROM $dept";
  $result2 = mysql_query($sql2);
  echo '&lt;form method="post" id="try2" action="pillar.php"&gt;';
  echo 'Select Batch: ';
  echo '&lt;select name="batch" id="batch"&gt;';
  while($q = mysql_fetch_assoc($result2))
  {
      $batch = $q['batch'];
      echo '&lt;option&gt;'.$batch.'&lt;/option&gt;'; 
  }
  echo '&lt;/select&gt;&lt;br&gt;&lt;br&gt;';
  echo '&lt;input type="submit"&gt;';
  </code></pre>
  
  <p>.how can i restrict the outputting of data with the same value that was retrieved from the database using the select statement? help pls! Thanks in advance!</p>