#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    5
    Rep Power
    0
    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?]

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Aalborg, Denmark
    Posts
    36
    Rep Power
    15
    Hi

    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

    // Martin


    [This message has been edited by kaasgaard (edited September 18, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    5
    Rep Power
    0
    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.

Similar Threads

  1. Large tables or many small tables?
    By Tassadar356 in forum MySQL Help
    Replies: 4
    Last Post: February 8th, 2004, 02:07 PM
  2. tables get corrupted
    By 90coders in forum MySQL Help
    Replies: 1
    Last Post: December 5th, 2003, 06:23 AM
  3. Replies: 0
    Last Post: October 15th, 2003, 09:02 PM
  4. Synchronizing 2 tables with different field structure
    By nickcwj in forum Database Management
    Replies: 0
    Last Post: October 15th, 2003, 08:55 PM
  5. variables and mysql tables ids help!
    By iamkeith26 in forum PHP Development
    Replies: 1
    Last Post: July 27th, 2003, 09:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo