After wasting couple of hours on google.com for searching solution, i came here with hope to get quick reply. Well, i am developing an application in php. I am not sure how to access option tag value using php. My code snippet is as below: echo '<select name="number" action="next.php" method="post">'; for ($i=1; $i <=10; $i++) { echo "<option value ='$i'>$i</option>"; } echo '</select>'; Code (markup): This basically shows you a drop-down list from 1 to 10. User can choose any one of them. As soon as user choose one of the option, i wan to pass the value to another file next.php. I dont want to use submit button. It should pass automatically. I don't know how to do this. Quick reply will be highly appreciated. Thanks in advance.
echo '<form name = "formname" method="post" action ="next.php">'; echo '<select name="number" onchange="form.submit()">'; for ($i=1; $i <=10; $i++) { echo "<option value ='$i'>$i</option>"; } echo '</select> </form>';