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
Share on other sites

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.