title: How do I obtain the value of the option that was chosen in a select from?
body: <p>In the PHP code below I have created a form that is used to create a drop down list. </p>
  
  <pre><code>&lt;?php
  echo "&lt;body&gt;";
  echo "&lt;div id='network_name' class='col-md-3'&gt;";
  echo "&lt;h2&gt; Agency Network &lt;/h2&gt;";
  echo "&lt;form action='droplistpop.php' method='post'&gt;";
  echo "&lt;select name='network'&gt;";
  while($result1 = mysqli_fetch_assoc($result)) {
      unset($network_id, $network_name);
      $network_id = $network_name['network_id'];
      $network_name = $result1['network_code'];
      echo '&lt;option name="entry" value="' . $network_id . '"&gt;' . $network_name . '&lt;/option&gt;';
      $network_chosen = $network_id;
  
  }
  
  echo "&lt;/select&gt;";
  echo "&lt;input name='submit' type='submit' value='Send' /&gt;";
  echo "&lt;/form&gt;";
  echo "&lt;/div&gt;";
  ?&gt;
  </code></pre>
  
  <p>This code works as desired. It populates a drop down list based on the results of a database query. After the form has been submitted, I want to obtain the option that was selected and use it in another query. After the submit, I print the contents of the $_POST variable using:</p>
  
  <pre><code>print_r($_POST);
  </code></pre>
  
  <p>and my results are as follow:
  Array ( [network] => [submit] => Send )</p>
  
  <p>I want to get the value that was selected for network but it appears to be blank. Can anyone tell me what I'm doing wrong. </p>
  
  <p>By the way, I am really new at coding and this is my first time using SO so please excuse any usage errors on my part. Thanks. </p>