title: Bootstrap variable passed over to Flask
body: <p>First of all sorry if that's a silly question, but I am kind of stuck..</p>
  
  <p>I want to pass a couple of variables from my HTML/Bootstrap page to Flask. The variables are obtained in a form.</p>
  
  <p>The variable is to be selected from a dropdown. Once the variable is selected from mySQL2 it should be stored in <code>customername</code>.</p>
  
  <p>At the moment I've got this sample code which does not work at all. </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="" class="form-group" method="post"&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="selectcustomer"&gt;Select your customer&lt;/label&gt;
          &lt;input
              &lt;select class="form-control" id="selectcustomer"&gt;
                  {% for j in mySQL2 %}
                  &lt;option&gt;{{j[2]}}&lt;/option&gt;
                  {% endfor %}
              &lt;/select&gt; value="{{request.form.customername}}"&gt;
          &lt;input type="text" class="form-control"  name="customername" value="{{request.form.customername}}"&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;input class="btn btn-default" type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How can I post the selected value into <code>customername</code>? </p>
  
  <p>The form looks like this: 
  <img src="https://i.stack.imgur.com/bhvgW.png" alt="Screenshot from Broswer"></p>
  
  <p>I need the selection field to be a dropdown. Once a value is selected it should be stored in <code>customername</code>.</p>