title: How to return list of values selected in dropdown using flask and html
body: <p>I have four dropdowns and I trying to return a list of all the options selected back. I am using html with flask. I have a button placed named start. I need that on the click of start button the list of all the 4 options selected in the dropdown should be returned. 
  I am very new to Flask. This is the first time I am working with it, so please help me.<a href="https://i.stack.imgur.com/WPJpA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WPJpA.png" alt="enter image description here"></a></p>
  
  <p>The html code is </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta name = "viewport" content = "width=device-width, initial-scale =1.0"&gt;
      &lt;title&gt;Select Options&lt;/title&gt;
     &lt;style&gt;
      body {
          background: url("F:/Meethi Folder/COLLEGE/COMPETITIONS/Sidh Competition/nmims_logo.png");
          background-position:515px 330px;
          background-repeat: no-repeat;
          background-size:15%;
           }
  
      h2 {
       color: black;
         }
  
      .wrapper{
          text-align:center;
      }
      .button{
          position:absolute;
          left:570px;
          background-color:#A9A9A9;
          font-size: 30px;
          top:35%;
      }   
  
      form{
          display:inline-block
      }
  
      .ex
      {
      margin:auto;
      width:90%;
      padding:40px;
      border:outset;
      }
  
      select
       {
      display:inline-block;
      cursor:pointer;
      font-size:16px;
      }
      .ey
      {
       display:inline-block;
      padding:40px;
       } 
  
      .gap{
      clear:both;
      margin-bottom:2px;
      }
  
     &lt;/style&gt;
    &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class = "ex"&gt;
  &lt;form method="post"&gt;
  &lt;h2&gt; Choose The Programme:&lt;/h2&gt;
        &lt;select name="val"&gt;
          &lt;option value="None"&gt;Select Programme&lt;/option&gt;
          &lt;option value="BTech"&gt;BTech&lt;/option&gt;
      &lt;option value="BTech Integrated"&gt;BTech Integrated&lt;/option&gt;
          &lt;option value="MTech"&gt;MTech&lt;/option&gt;
          &lt;option value="MBATech"&gt;MBATech&lt;/option&gt;" . $options . "
        &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;form class = "ey"&gt;
  &lt;h2&gt; Choose The Course:&lt;/h2&gt;
        &lt;select&gt;
          &lt;option value="None"&gt;Select Course&lt;/option&gt;
          &lt;option value="CS"&gt;Computer Science&lt;/option&gt;
      &lt;option value="Civil"&gt;Civil&lt;/option&gt;
          &lt;option value="DS"&gt;Data Science&lt;/option&gt;
      &lt;option value="Electrical"&gt;Electrical&lt;/option&gt;
      &lt;option value="Electronics"&gt;Electronics&lt;/option&gt;
      &lt;option value="CS"&gt;Chemical&lt;/option&gt;
      &lt;option value="CS"&gt;Mechatronics&lt;/option&gt;
          &lt;option value="IT"&gt;Information Technology&lt;/option&gt;
      &lt;option value="Mech"&gt;Mechanical&lt;/option&gt; " . $options . "
        &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;form class="ey"&gt;
  &lt;h2&gt; Choose The Year:&lt;/h2&gt;
        &lt;select&gt;
          &lt;option value="None"&gt;Select Year&lt;/option&gt;
          &lt;option value="First Year"&gt;First Year&lt;/option&gt;
          &lt;option value="Second Year"&gt;Second Year&lt;/option&gt;
          &lt;option value="Third Year"&gt;Third Year&lt;/option&gt;
      &lt;option value="Fourth Year"&gt;Fourth Year&lt;/option&gt;
      &lt;option value="Fifth Year"&gt;Fifth Year&lt;/option&gt;
      &lt;option value="Sixth Year"&gt;Sixth Year&lt;/option&gt;
        &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;form class = "ey"&gt;
  &lt;h2&gt; Choose The Hour:&lt;/h2&gt;
        &lt;select&gt;
          &lt;option value="None"&gt;Select Time Slot&lt;/option&gt;
          &lt;option value="8:00 am"&gt;8:00 am&lt;/option&gt;
          &lt;option value="9:00 am"&gt;9:00 am&lt;/option&gt;
          &lt;option value="10:00 am"&gt;10:00 am&lt;/option&gt;
      &lt;option value="11:00 am"&gt;11:00 am&lt;/option&gt;
      &lt;option value="12:00 pm"&gt;12:00 pm&lt;/option&gt;
      &lt;option value="1:00 pm"&gt;1:00 pm&lt;/option&gt;
      &lt;option value="2:00 pm"&gt;2:00 pm&lt;/option&gt;
      &lt;option value="3:00 pm"&gt;3:00 pm&lt;/option&gt;
      &lt;option value="4:00 pm"&gt;4:00 pm&lt;/option&gt;
      &lt;option value="5:00 pm"&gt;5:00 pm&lt;/option&gt;
        &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;div class = "wrapper"&gt;
  &lt;button class = "button" onclick=click()&gt;Start&lt;/button&gt;
  &lt;/div&gt;
  
  
  &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>