2 drop down menus w/o submit button <p>I would like to know how to submit two drop down menus w/o a submit button. I want to populate the second drop down menu on selection of the first and then be able to echo out the selection of the second drop down menu. Data for the second drop down menu is obtained from a mySQL database. I am using two forms on my page, one for each drop down menu.</p> <pre><code> &lt;form method="post" id="typeForm" name="typeForm" action=""&gt; &lt;select name="filterType" onchange="document.getElementById('typeForm').submit()"&gt; &lt;option &lt;?php if ($_POST['filterType'] == 'none') print 'selected '; ?&gt; value="none"&gt;Filter by...&lt;/option&gt; &lt;option &lt;?php if ($_POST['filterType'] == 'employee') print 'selected '; ?&gt; value="employee"&gt;Employee&lt;/option&gt; &lt;option &lt;?php if ($_POST['filterType'] == 'taskName') print 'selected '; ?&gt; value="taskName"&gt;Task&lt;/option&gt; &lt;/select&gt; &lt;noscript&gt;&lt;input type="submit" value="Submit"/&gt;&lt;/noscript&gt; &lt;/form&gt; &lt;form method="post" id="categoryForm" name="typeForm" action=""&gt; &lt;select name="filterCategory" onchange="document.getElementById('categoryForm').submit()"&gt; &lt;option &lt;?php if ($_POST['filterCategory'] == 'none') print 'selected '; ?&gt; value="none"&gt;&lt;/option&gt; &lt;? $count2 = 0; echo $rowsAffected2; while ($count2&lt;$rowsAffected2) { echo "&lt;option value='$filterName[$count2]'&gt;$filterName[$count2]&lt;/option&gt;"; $count2 = $count2 + 1; } ?&gt; &lt;/select&gt; &lt;noscript&gt;&lt;input type="submit" value="Submit"/&gt;&lt;/noscript&gt; &lt;/form&gt; </code></pre> <p>I can submit the first form with no problem. It retrieves values into the second drop down menu successfully.But on selecting a value from the second menu the page refreshes and I'm left with an two unselected drop down menus. I tried echoing the $_POST['filterCategory'] and didn't get a result. I tried using onchange="this.form.submit();" in both forms and I still get the same result. Is there a way to do this without using AJAX, JQuery or any complex Javascript script? I require to this completely in PHP. </p> <p>I want to avoid the second refresh but still be able to gather the $_POST[''] data from the second selection.</p>