September 18th, 2000, 03:09 PM
Can anybody help.
I'm writing an application that requires output to a multi-line listbox (similar to the inbox of MS outlook, with scroll bars). The lisbox will be populated from a query to a mysql database. The second part of my question is how do I select individual lines, using PHP, from the listbox?
[could a table object be used in the same way?]
September 18th, 2000, 04:07 PM
I'm not sure what you're asking but i have a coupple of options for you:
1) You're using the drop-down box in a form and you wonder how to select more than one line and parse all selected lines when you submit.
ANS: <select name="myArray" multiple size=7> will let you select multiple lines and adding  to the end of the name will store the selected values in an array, in this case called myArray. Size=7 displays 7 lines at a time in the drop-down box.
2) You wonder how to pre-select one or more lines.
ANS: <option selected>value</option>
selected pre-highlights the line. You can use it as many times as you want to (in 'multiple-mode'). Since you're getting you're data from a db you have to figure out the criterias and functions to add 'selected' to the list
Hope this helps you
[This message has been edited by kaasgaard (edited September 18, 2000).]
September 18th, 2000, 06:43 PM
Thanks for the reply. Good suggestion.
You suggested using a drop-down list box. This would not be appropriate for my app. How would I populate a "reqular" multi-line box (without the drop-down feature)? Secondly, how would I select one-line from a populated listbox?
Again, thanks for your help.