title: PHP and MySQL: How to update MySQL Table using dropdown?
body: <p>I have a table like this:</p>
  
  <pre><code>&lt;form method="post"&gt;
  &lt;table border="1" cellpadding="3" cellspacing="3"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;select&gt;
    &lt;option value="volvo"&gt;Value 1&lt;/option&gt;
    &lt;option value="saab"&gt;Value 2&lt;/option&gt;
    &lt;option value="mercedes"&gt;Value 3&lt;/option&gt;
    &lt;option value="audi"&gt;Value 4&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="text"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="text"/&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="text"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  ...
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to update my database with values on that table using PHP and MySQL query.
  I know i need something like this, but how do i get values from dropdown list and input?</p>
  
  <pre><code>mysqli_query($con,"UPDATE MyTable SET fields=&lt;values&gt; AND morefields=&lt;inputvalues&gt;
  WHERE fields=&lt;dropdownvalue&gt;");
  </code></pre>