title: Can't get drop down list value from html in php
body: <p>My first php code gets the values from the table "mytable" which are January, February and March respectively. It works well, I could see Month,January,February and March inside the drop down list. My problem is within the second php code, when I click the search button, nothing happens. What I expected it to do was print out the value from the drop down list but sadly, I get nothing.</p>
  
  <pre><code>&lt;select name="monthchoice"&gt;
  &lt;option value=""&gt;Month&lt;/option&gt;; 
  
  &lt;?php   
  $request="SELECT date FROM mytable WHERE username='qwe'";
  $result=mysqli_query($con, $request);
  while($fetch = mysqli_fetch_assoc($result))
  {
  echo '&lt;option value="'.$fetch['date'].'"&gt;'.$fetch['date'].'&lt;/option&gt;'; 
  }
  ?&gt;
  
  &lt;/select&gt;
  &lt;input type="submit" value="Search" name="submit"/&gt;
  
  &lt;?php
  if(isset($_POST["submit"]))
  {
      if(!empty($_POST['monthchoice']))
          {
          $monthchoice1=$_POST['monthchoice'];
          echo "&lt;br&gt;";
          echo $monthchoice1;
          }
      else
          {
          echo "&lt;br&gt;";
          echo 'Please choose a month!';
          }
  }
  ?&gt;
  </code></pre>