pneudralics Posted April 12, 2009 Share Posted April 12, 2009 How can I pass the value of the option to a url? I tried doing it with get but the variable I have set is always empty. <select name="select"> <option> </option> </select> Link to comment https://forums.phpfreaks.com/topic/153793-how-do-i-pass-a-drop-down-form-option-to-a-url/ Share on other sites More sharing options...
jackpf Posted April 13, 2009 Share Posted April 13, 2009 You do need to have something between the option tags. Or at least assign them a value. Link to comment https://forums.phpfreaks.com/topic/153793-how-do-i-pass-a-drop-down-form-option-to-a-url/#findComment-808263 Share on other sites More sharing options...
pneudralics Posted April 13, 2009 Author Share Posted April 13, 2009 You do need to have something between the option tags. Or at least assign them a value. Yes I understand that. Just wasn't sure if the readers got what I was talking about so I just put it there. Link to comment https://forums.phpfreaks.com/topic/153793-how-do-i-pass-a-drop-down-form-option-to-a-url/#findComment-808267 Share on other sites More sharing options...
jackpf Posted April 13, 2009 Share Posted April 13, 2009 <form action="" method="get"> <select name="something"> <option>value</option> <option>value2</option> </select> <input type="submit" /> </form> Should work. Tis what I said in the first place tbh. Link to comment https://forums.phpfreaks.com/topic/153793-how-do-i-pass-a-drop-down-form-option-to-a-url/#findComment-808271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.