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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/86751-getting-form-select-value/#findComment-443387 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.