Scavenger Posted January 19, 2008 Share Posted January 19, 2008 If you have a form as follows: <form> <select name="dropdown"> <option value="1">Select 1</option> </select> </form> How can you get php to read the value of the selected option ("1") or write its own value (e.g. $sel = 1)? Is this possible to do when the page is loading for the first time? Thanks Link to comment https://forums.phpfreaks.com/topic/86751-getting-form-select-value/ Share on other sites More sharing options...
Daniel0 Posted January 19, 2008 Share Posted January 19, 2008 $_POST['dropdown'] or $_GET['dropdown'] depending on how you submit the form. Link to comment https://forums.phpfreaks.com/topic/86751-getting-form-select-value/#findComment-443387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.