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!?!?

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.

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.