Jump to content

Recommended Posts

hi,
i have an add page where i fill out text fields and select multiple items from a list box and then add these to a database field. My problem is that i have a seperate edit page where i am trying to display this data again and don't know how to display the list items that were selected highlighted and in the list as well as the options from the add page so the user can update the field..

I'm not sure if i have explained this clearly enough, on the edit page i have all the fields from the add page shown so they can be updated, I have no problem showing in the text areas the values that are in the database but don't know how to do this for the list field, (doing this with checkboxes would also be ok but again i'm not sure how to show which checkboxes are selected using only one db field)
cheers
Link to comment
https://forums.phpfreaks.com/topic/11218-how-to-display-multiple-items-in-list/
Share on other sites

Hello,


[code]
  <select name="select" size="1" multiple>
    <option value="1" selected>1</option>
    <option value="2" selected>2</option>
    <option value="3" selected>3</option>
    <option value="4">4</option>
    <option value="5">5</option>
  </select>
[/code]

hth
hi,
thanks for your reply. I don't think i explained it clearly enough, I want to show the items in a list which i can do, and have the items that are in the database field already selected in the list when page loads..

so the results is i end up with a list that has all the items available and some of them (the ones in database) are the only ones selected.
[!--quoteo(post=380427:date=Jun 6 2006, 12:15 AM:name=John_6767)--][div class=\'quotetop\']QUOTE(John_6767 @ Jun 6 2006, 12:15 AM) [snapback]380427[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hi,
thanks for your reply. I don't think i explained it clearly enough, I want to show the items in a list which i can do, and have the items that are in the database field already selected in the list when page loads..

so the results is i end up with a list that has all the items available and some of them (the ones in database) are the only ones selected.
[/quote]

Do you mean you want to show the information in the database throw a select form.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.