title: PHP update data from dropdown
body: <p>how to update selected data from dropdown to mysql (mysql update) using php?</p>
  
  <pre><code>&lt;form&gt;
  &lt;select name="maintenance_mode"&gt;
    &lt;option&gt;Maintenance On&lt;/option&gt;
    &lt;option&gt;Maintenance Off&lt;/option&gt;
  &lt;/select&gt;
  &lt;button type="submit" name="update"&gt;Apply&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The i set column type to tinyint(1). basically just update 0 or 1.</p>