Jump to content


Photo

how to display multiple items in list


  • Please log in to reply
3 replies to this topic

#1 john_6767

john_6767
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts

Posted 05 June 2006 - 06:47 AM

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

#2 samshel

samshel
  • Members
  • PipPipPip
  • Advanced Member
  • 837 posts

Posted 05 June 2006 - 06:56 AM

Hello,


  <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>

hth
Cheers,
SamShel
-----------------------------------------------
--: FUTURE IS LINUX :--
-----------------------------------------------

#3 john_6767

john_6767
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts

Posted 06 June 2006 - 12:15 AM

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.

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 06 June 2006 - 12:20 AM

[!--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) View Post[/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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users