title: Submit an HTML select/dropdown form to MySQL database
body: <p>I am trying to submit an HTML <code>&lt;form&gt;</code> and have the <code>input</code> and <code>select</code> information entered into a MySQL database table. My code is entering the <code>&lt;input type="text"&gt;</code> data into the table, but it is not entering the data in the <code>&lt;select&gt;</code>.</p>
  
  <p>This is the <code>&lt;form&gt;</code> I have been using:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="send.php" method="post"&gt;
      &lt;select name="gender"&gt;
          &lt;option value="Male"&gt; Male&lt;/option&gt;
          &lt;option value="Female"&gt;Female&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type="text" name="name"&gt;
      &lt;input type="submit" value="Add"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And this is the PHP I've been using to enter the form into the table: </p>
  
  <pre><code>&lt;?php
  $gender=$_POST['gender']; // This is the select/dropdown
  $name=$_POST['name'];  // This is the text input
  
  mysql_connect("", "", "") or die(mysql_error()) ; 
  mysql_select_db("") or die(mysql_error()) ; 
  
  mysql_query("INSERT INTO `table1` VALUES ('$gender', '$name')") ; 
  ?&gt;
  </code></pre>