title: populating dropdown list from mysql data (remove from dropdown if in separate DB)- php/html
body: <h2>Update 02:</h2>
  
  <p>As requested in the comments on my original question I am including my actual schema and will try and explain better based on what FunkFortyNiner said.</p>
  
  <p>Any confusion or if you are unsure please comment and ask me questions! I am unable to go into PHP chat due to my rep and have gone over this question numerous times now!</p>
  
  <h2>DB_2</h2>
  
  <pre><code>Field    Type    Null    Key    Default    Extra
  id      int(11)    NO    PRI    NULL    auto_increment
  key    varchar(25) NO           NULL
  r_name varchar(50) NO           NULL
  r_uid  int(255)    NO           NULL
  </code></pre>
  
  <h2>DB_1</h2>
  
  <pre><code>Field     Type       Null    Key    Default    Extra
  id        int(11)     NO     PRI    NULL    auto_increment
  u_name    varchar(50) NO            NULL
  pass      varchar(255)NO            NULL
  sub_start datetime    NO            CURRENT_TIMESTAMP
  sub_end   datetime    NO            NULL
  is_r      int(1)      NO            NULL
  admin     int(1)      NO            NULL
  a_key     varchar(25) NO            NULL
  </code></pre>
  
  <p>Okay so far everything that I have done is working fine and as I want it too. </p>
  
  <p>I have asked this question for help with doing the part I am stuck on.</p>
  
  <p>Say <strong>DB_2</strong> is filled with some data.</p>
  
  <p>I have a form on my site currently which when I fill it out it inserts the data into <strong>DB_1.</strong></p>
  
  <p>I want to add a dropdown to the form to display the keys from <strong>DB_2</strong> (this part is easy and plenty of already existing questions on this)</p>
  
  <p>What I am actually stuck on is then having it so once the key has been taken from <strong>DB_2</strong> and inserted into <strong>DB_1</strong> by my form I no longer want to be able to select that key from the dropdown (otherwise I run this risk of adding duplicates!</p>
  
  <p>I hope this is easier to understand and less confusing/likely to be seen as a duplicate! Please feel free to ask my any questions or to further explain something before you just write this question off as unnecessary or already asked!</p>
  
  <p>Thanks a lot for taking the time to read all of this! :)</p>
  
  <h2>---------------------------------------------------------------------------</h2>
  
  <hr>
  
  <h2>Original Question (prior to being re-explained)</h2>
  
  <p>I have a quick question on a topic that I'm quite a noob about. I have a website I made that connects to a mysql database through php.</p>
  
  <p>I have a form which I want to include a dropdown in and I want the data inside the dropdown to be taken from a column in my DB.</p>
  
  <p>The thing is I also want it so that once that data is then saved in my DB it no longer shows up in the dropdown.</p>
  
  <p>So example db schema</p>
  
  <pre><code>DB_1
  ------------------
  Column_1 | Column_2 | Column_3
  ------------------
  
  DB_2
  --------------------
  Column_1 | Column_2
  --------------------
  </code></pre>
  
  <h2>Example/Explanation of what I want to do:</h2>
  
  <p>So my form inserts data into DB_1
  I want the dropdown to display all the results from DB_2/Column_1</p>
  
  <p>Once DB_2/Column_1 matches DB_1/Column_3 for example then I no longer want that value to show up in the dropdown anymore.</p>
  
  <p>Hope that makes sense and I explained it well enough!</p>
  
  <p>Thanks :)</p>
  
  <p>EDIT:
  Not a Duplicate Question! This was marked as duplicate and suggested the following:
  <a href="https://stackoverflow.com/questions/10252307/php-mysql-displaying-results-as-drop-down-list">php mysql displaying results as drop down list</a>
  Answer: "Assuming all you're trying to do is echo these rows into a dropdown:"</p>
  
  <p>That is <strong>not</strong> all that I am trying to do. I also do not want the data to show up in the dropdown if it appears in DB_1</p>
  
  <p>Hope this clarifies things! Thanks again :)</p>