My site is broken into three different categories (which are stored on 3 separate tables) and I am looking at creating a functionality to let a user upload photos. Ideally, I would like the following to happen:

  1. A user is viewing a single retail store on the site, for example and clicks "upload photos"
  2. The user is prompted with a box that allows them to upload multiple photos simultaneously. These photos need to be "tagged" or associated with this particular store so they can be displayed later (more on that in a bit)
  3. On upload, the files are renamed and sent to a directory specified in the upload script and their path(s) are saved in the database itself.
  4. The page refreshes and now the photos are there (along with any other user's photos submitted for that particular store). Note: this is why it's important to tag photos to a particular store, that way they can be retrieved when the store is viewed without displaying other store's photos.

Does anyone have some guidance on where to start with this or if there is a ready-made solution out there for this type of setup?

Α «retail store» is an object or has id in relation database (even in text data like VSAM a key) so you have a way to mark the input file tag. You could do it in two ways (as I am thinking it now) the first one is the obvious by an array (e.g.… with title file-52[]) witch is great but difficult in first level validation – JavaScript and a second one giving each one a distinct title/id (e.g. file-52-0) witch could be easier to validate, and than in PHP checking for posts with those flags.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.