title: Inserting data into MySQL from a dropdown
body: <p>I'm trying to make a dropdown list that allows users to select a training program that matches their needs, so when they select it, the option will go into a table in the MySQL database.</p>
  <p>This is my HTML form:</p>
  <pre><code>&lt;form action=&quot;sessionreq.php&quot; method=&quot;POST&quot;&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label for=&quot;exampleSelect1&quot;&gt;Category&lt;/label&gt;
          &lt;select class=&quot;form-control&quot; id=&quot;exampleSelect1&quot;&gt;
              &lt;option name='eg1'&gt;Example option&lt;/option&gt;
              &lt;option name='eg2'&gt;Example option 2&lt;/option&gt;
              &lt;option name='eg3'&gt;Example option 3&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;button type=&quot;submit&quot; class=&quot;button button-block&quot; name=&quot;delete&quot;&gt;Request&lt;/button&gt;
      &lt;br&gt;
  
  &lt;/form&gt;
  </code></pre>
  <p>What I need is an SQL query that will go with it, so when they select 'Example option 3', it will be entered into the database in a column called <code>method</code>. I should be inserted into <code>method</code> with the values (depending on their option in the dropdown). For example, if the user selected <code>Example option 2</code> it would be inserted into <code>method</code> with the values <code>Example option 2</code>.</p>
  <p>How do I populate database tables/columns with dropdowns?</p>