Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pulling value from drop down list boxes

Status
Not open for further replies.

kpdvx

Programmer
Dec 1, 2001
87
US
I have a dynamically created drop down list box, it has a bunch of numbers as values.

while($row = mysql_fetch_object($result))
{

echo &quot;<option value=\&quot;future_id\&quot;>&quot;;
echo $row->issue_id;
echo &quot;</option>&quot;;

}

i want to be able to pull the selected value from it. like say, echo $future_id, and if the user had selected '21', then $future_id == 21. Any ideas?
 
If you have register_globals turned on, it will be the name of the <SELECT> tag which has the value.

Otherwise, depending on whether the form is &quot;method=GET&quot; or &quot;method=POST&quot; the value will be in $_GET['<name of SELECT>'] or $_POST['<name of SELECT>'], respectively. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top