title: PHP/JQuery Dynamic Drop Down not sending variable via POST
body: <p>I have a two step drop down menu. The second select is triggered with jquery. Since I have put this step in, my form does not pass the variable of the selected option. I expect it to just post but it doesn't. I have always had it loaded dynamically, so I didn't think that was the issue. I can't get it to work by passing it through the URL either. </p>
  
  <p>Here is my code: 
  search.php </p>
  
  <pre><code>while($row = mysqli_fetch_array($result)) { ?&gt;
      &lt;option value="&lt;?=$row['id']?&gt;"&gt; &lt;? echo $row['name'] ?&gt;&lt;/option&gt;
  
  &lt;?php }
  
  &lt;form method = "post" action="index.php?page=users&amp;id=&lt;?php echo $row['id']; ?&gt;"&gt;
  
                              &lt;p&gt;
  
                                  &lt;select name="list-select" id="list-select"&gt;
                                       &lt;option value="AL"&gt;Alabama&lt;/option&gt;
                                          &lt;option value="AK"&gt;Alaska&lt;/option&gt;
                                          &lt;option value="AZ"&gt;Arizona&lt;/option&gt;
                                          &lt;option value="AR"&gt;Arkansas&lt;/option&gt;
  
                                          &lt;option value="CA"&gt;California&lt;/option&gt;
                                          &lt;option value="CO"&gt;Colorado&lt;/option&gt;
                                          &lt;option value="CT"&gt;Connecticut&lt;/option&gt;
                                          &lt;option value="DE"&gt;Delaware&lt;/option&gt;
                                   &lt;/select&gt;
  
                       &lt;?php       
  
                      echo '&lt;select name="list-target" id="list-target"&gt;';
  
                      echo '&lt;/select&gt;';
  
                               $installation_id =  $_POST['list-target'];
  
  
                       mysqli_close($con);
                          ?&gt;
  </code></pre>
  
  <p>users.php:</p>
  
  <pre><code>$installation_id = $_POST['list-target'];  
  </code></pre>
  
  <p>.js</p>
  
  <pre><code>$(document).ready(function($) {
      $("#list-select").change(function() {
         $("#list-target").load("index.php?page=search&amp;svalue=" + $("#list-select").val());
      });
  });
  </code></pre>
  
  <p>Thanks.</p>