title: Selecting Values in PHP From Double Drop-Down Menu
body: <p>I am creating a drop-down menu in which the second drop-down is dependent upon the first; the first drop down is a list of table, and depending on what table you select, the columns of that table will be able to be selected.</p>
  
  <pre><code>&lt;form id = "table_column" action = "file_name.php"&gt;
      &lt;select id = "tables" name = "tables" onclick = "script();"&gt;
          &lt;option name = "table_option_one" value = "people"&gt;people&lt;/option&gt;
          &lt;option&gt;...&lt;/option&gt;
      &lt;/select&gt;
      &lt;select id = "columns" name = "columns" onclick = "other_script();"&gt;
          &lt;option name = "column_option_one" value = "name"&gt;name&lt;/option&gt;
          &lt;option&gt;...&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type = "submit"&gt;&lt;/input&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have tried the code below to no success.</p>
  
  <pre><code>$table_name = $_POST["tables"];
  $column_name = $_POST["columns"];
  </code></pre>
  
  <p>How do I access the values selected in each drop-down menu in PHP?</p>
  
  <p><em>I am only having a problem with the retrieval of the selected values.</em> The menus depending on another and switching work fine</p>