I have a drop down box which has 150 options I want to get the value of current option selected.I tried to achieve that using javascript and was successful.Now what I want is I want to pass the value to php so that php knows which option is selected and on that basis I have to change the value of a particular variable in PHP. How can I achieve this type of functionality.This is my code to select which option is selected in drop down menu in javascrpit
function myfun(){
var e=document.getElementByName("location");
var strUser = e.options[e.selectedIndex].value;
strUser will ocntain the index value of dropdown option But how can I use this value in php
This is my drop down code
<form action="final.php" method="post">
<select style="width: 200px;" name="location" onchange="myfun">
<option value="All">All</option>
<option value="Noida Sector 1">Noida Sector 1</option>
<option value="Noida Sector 2">Noida Sector 2</option>
<option value="Noida Sector 3">Noida Sector 3</option>
<option value="Noida Sector 4">Noida Sector 4</option>
<option value="Noida Sector 5">Noida Sector 5</option>
<option value="Noida Sector 6">Noida Sector 6</option>
<option value="Noida Sector 7">Noida Sector 7</option>
</select>