-
Hi,
Im working on php3 with MySQL .....I need to let the user select an item from a drop-down list..
Ive used the <select> and <option> tags to display att the items.
how do I get back the item which the user has selected???
Any help will be greatly appreciated.
Thanx.
-
here is the a VBScript example
the formname is "form1"
<FORM id=form1 name=form1>
the select box is called "select1"
<SELECT id=select1 name=select1>
to get the string selected use the following command.
myvar = form1.select1.value
hope it helps
-
realised that if I use :
<select name="mylist">
<option value="name"> name</option>
<option value="age"> age</option>
<option value="address"> address</option>
</select>
php3 automatically takes the selected item into a variable ($mylist)
thanx anyway stefank. :-)