Jump to content

little help with multi select..


therob1

Recommended Posts

as im new to php i decided to build my own photo gallery system which will also give me a chance to use many fo the features in php and to help me learn.

 

so far ive managed to to build a basic gallery system where i can upload images to the server, make thumbnails and manipulate the images using gd library.

 

the next phase of the project is to create some kind of category tags, which i have managed to do with a multi select box, where i have created an IMAGE table, CATEGORY table and a CAT_IMG table to deal with multiple tags for multiple images... so when the items are selected in the box it submits the the values and (delete all records with selected image first), loops through each value in the array where i INSERT the ids into the CAT_IMG table.

 

this all works for me, although i could probably improve the process where i delete existing items then re-insert the newly selected ones - would love to get some advice on this if this is poor design

 

however the one thing thats got me confused is trying to use a html multi select box to preselect items that have been previously selected, so if i had 50 category tags the user wouldnt have tio reselect all of those again if they just wanted to add 1 item, would anyone be able to point me in the right direction, im sure i've overlooked something really simple  :shrug:

Link to comment
https://forums.phpfreaks.com/topic/206456-little-help-with-multi-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.