Hi
I have a HTML form with selected option values. I am trying to get the currently selected item and store it inside a php variable to do something with it further down the page. I need to do all of this without refreshing/reloading the page (if possible).
<form method="post">
<select name="MySelect">
<option value="year 1">year 1</option>
<option value="year 2">year 2</option>
<option value="year 3">year 3</option>
</select>
</form>
[php]
<?php if(!empty($_POST['MySelect'])) { $selected = $_POST['MySelect']; echo $selected; } [/php] To clarify the above "should" echo out the selected option everytime onchange of the selected option. Any help is appreciated, regards.