john_6767 Posted June 5, 2006 Share Posted June 5, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/11218-how-to-display-multiple-items-in-list/ Share on other sites More sharing options...
samshel Posted June 5, 2006 Share Posted June 5, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/11218-how-to-display-multiple-items-in-list/#findComment-41963 Share on other sites More sharing options...
john_6767 Posted June 6, 2006 Author Share Posted June 6, 2006 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 Link to comment https://forums.phpfreaks.com/topic/11218-how-to-display-multiple-items-in-list/#findComment-42240 Share on other sites More sharing options...
redarrow Posted June 6, 2006 Share Posted June 6, 2006 [!--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. Quote Link to comment https://forums.phpfreaks.com/topic/11218-how-to-display-multiple-items-in-list/#findComment-42242 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.