|
-
Aug 24th, 2000, 01:17 AM
#1
Thread Starter
Hyperactive Member
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.
-
Aug 24th, 2000, 06:17 AM
#2
New Member
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
-
Aug 24th, 2000, 11:34 PM
#3
Thread Starter
Hyperactive Member
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. :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|