So I have a drop down box that posts to the page on a submit button.
I am trying to remove the submit button and make it so it posts when you change the drop down as its a much better way to work!
The value = "submit_button" and it gets picked up by:
// Check if form has been submited
// If form has been submited set $newCookieValue variable, set cookie and refresh webpage
<select name="dbselector" onchange="this.form.submit()" style="margin-left:0.5em;">
<option value="option_1" selected="selected">option_1</option>
<noscript><input type="submit" value="submit_button"/></noscript>
<br> <?php var_dump($_POST['dbselector']) ?>
<br> <?php var_dump($_POST['submit_button'])?>
You need to state in your form that you are using
method in order to tell the form which HTTP method to use:
<form method="post"> ... </form>