Jump to content

[SOLVED] multiple images upload and add file names to DB with other data


StefanRSA

Recommended Posts

Hi,

 

This is driving me NUTS!!!

I am trying to upload multiple images to a folder on the server. The images needs to be reduced to a fixed size if to big, renamed (To avoid duplicates) and the names must be added into a single DB Entry...

 

Please can anybody help me... I am new to php and got a few samples to upload a single image and ad the name to a db.

 

My problem is that I don't really understand the code and don't know where to change a while loop to get each image name into the DB....

 

My table is as follow:

id, docid, Image_1, Image_2, Image_3, Image_4....

 

PLEASE PLEASE PLEASE can ANYBODY help me!?!?

Link to comment
Share on other sites

This part doesn't really make a whole lot of sense..

 

"the names must be added into a single DB Entry..."

 

What exactly is your logic behind this?  I've created a gallery application and each file name is stored as its own entry in the database.  The only reason you would put them all on the same entry would be to track them as one item and surely there are better ways to do that.

 

I mean think of the problems, if a user uploads 2 pictures it writes 2 entries whereas if they upload 10 it writes 10 entries, you need to have a lot of fields that don't end up being used.

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.