OZONE Asylum
Forums
Stupid Basic HTML
Multi-selection form elements
This page's ID:
9666
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hi Skaarjj The various elements that are selected by a user will be separated by commas (e.g. "option1,option2,option3,option4"). So you need to use a function or piece of script to separate the items that have been chosen... OR use one of the in-built functions that are in languages like ASP and PHP to separate the elements chosen into an array. Bear in mind, however, that if you have text elements in your select list, then you may in a worst-case scenario already have a comma in any of the items that are listed. So the easiest way to separate the chosen items is to store VALUEs against the various items, and read those back into your PHP script, as follows (ignore the spelling which is purposefully wrong for the sake of the example): <SELECT MULTIPLE NAME='city'> <OPTION VALUE=1>Rio d,Janeiro</OPTION> <OPTION VALUE=2>Brasilia</OPTION> <OPTION VALUE=3>Paris</OPTION> <OPTION VALUE=4>Bonn</OPTION> </SELECT> Now if a user selects two of the options, e.g. Brasilia and Bonn, then the value coming back into your PHP script should read as "2,4" If you haven't reached the end of the road and you're not at the start then you must be somewhere in the middle
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »