php dynamic dropdown box content
<p>I've got two data tables like below.</p>

<p>Table 1: </p>

<pre><code>--------------------
sbstart sbend totsb
--------------------
  200    205   6
</code></pre>

<p>Table 2:</p>

<pre><code>chkNo
------
 201
 203
</code></pre>

<p>I have got a dropdown box created dynamically which contains table 1 information which is all the responses from 200 to 205. In other words that dropdown has 200,201,202...205. What I now need is to exclude the numbers in table 2 once the dropdown box is created. For instance then the dropdown should have only 200,2004 and 2005 when it is displayed.</p>

<p>Here is the code I've done to get all the responses between start and end number as per table 1. Can someone please tell me how do I exclude the table 2 numbers once the dropdown is created. Thanks.</p>

<pre><code>    $con=mysql_connect('localhost','root') or die ("Server connection failure!");
$db=mysql_select_db('regional_data',$con) or die ("Couldn't connect the database");
$SQLx="SELECT * FROM table1";
$runx=mysql_query($SQLx,$con) or die ("SQL Error");
$norx=mysql_num_rows($runx);

while ($rec = mysql_fetch_array($runx))
    {
        for($i=$rec['sbstart']; $i&lt;=$rec['sbend']; $i++)
        {
        echo "&lt;option id='options' value='$i'&gt;$i&lt;br&gt;&lt;/option&gt;";
        }
    }
</code></pre>
