dakke Posted March 25, 2008 Share Posted March 25, 2008 How should one post a selected value from a php dropdown box?Using Javascript or is there another way to do it?Might seem a silly question, but very new to it all. Link to comment Share on other sites More sharing options...
shadowayex Posted March 25, 2008 Share Posted March 25, 2008 I'm not sure what you mean, but to get value from a dropdown you use the $_POST method, at least I do. *dropdown layout*<form action="page.php" method="post"><select name="dropdown"><option value="one">First Item</option><option value="two">Second Item</option></select></form>*page.php*<?php$value = $_POST['dropdown'];echo $value;?> If First Item was selected, "one" will display. If Second Item was selected, "two" will display. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.