mattichu Posted December 12, 2011 Share Posted December 12, 2011 Hey how would I post the selected value from the following code? $sql="SELECT username FROM members"; $result=mysql_query($sql); $options=""; while ($row=mysql_fetch_array($result)) { $username=$row["username"]; $options.="<OPTION VALUE=\"$id\">".$username; } ?> <SELECT NAME="person"> <OPTION VALUE=0>Choose <?=$options?> </SELECT> Link to comment https://forums.phpfreaks.com/topic/252968-posting-selected-drop-down-value/ Share on other sites More sharing options...
premiso Posted December 12, 2011 Share Posted December 12, 2011 <form name="form1" method="post" action=""><SELECT NAME="person"> <OPTION VALUE=0>Choose <?=$options?> </SELECT> <input type="submit" value="Submit" name="submit" /> </form> Link to comment https://forums.phpfreaks.com/topic/252968-posting-selected-drop-down-value/#findComment-1296997 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.