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> Quote 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> Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.