How do I post input and select value in php include file?
<p>I have an HTML/PHP file "index.php", i use jquery and php to generate and populate the second select from a value selected on the first select in index.php. The values of the generated select populates an input field using jquery. How can i post these php generated values together with other input and select values in the "index.php" at once</p>

<pre><code>Diagram
 index.php 

    //other input 

      &lt;select name="resident_type" id="resident_type"/&gt;
        &lt;option value="Resident"&gt;Resident&lt;/option&gt;
        &lt;option value="Non-Resident"&gt;Non-Resident&lt;/option&gt;
   &lt;/select&gt;

//jquery to get the selected value from select in index.php to pass func.php to query db

      $('#resident_type').change(function(){     
      $.get("func.php", {
        func: "resident_type",
        drop_var: $('#resident_type').val()
        .........
//more code
//included connetion.php
//func.php, the php generated select
if($_GET['func'] == "resident_type" &amp;&amp; isset($_GET['func'])) { 
   drop_1($_GET['drop_var']); 
}
function drop_1(){
 --connection to the db
&lt;select name="roomtype" id="roomtype"/&gt;
   //some sql populating the generated select
        &lt;option value="x"&gt;y&lt;/option&gt;
        &lt;option value="y"&gt;y&lt;/option&gt;
   &lt;/select&gt;
}
</code></pre>
