Jump to content

Need help trying to figure out a way to do this upload script


jbrill

Recommended Posts

Hey guys,

Im working on an inventory system for a client and I need help with how I should manage the photo uploads.

My client would like to have an unlimited amount of photos per product OR a set number of allowed photos (around 12)

 

I know the easiest way to do this would probably to set 12 columns in the product table photo1,photo2,photo3 and so on, but that doesn't seem very productive or proper.

 

Can anyone suggest the best way to manage this type of photo upload? also, i would like to have the full-size image as well as a auto generated thumbnail uploaded.

 

thanks in advance!

well you could make another table called photos and have a couple fields

 

imageid,                    productid,    linktophoto

int(11)autoincrement,  int(11),        varchar(255)

 

now the photos will be linked to the particular product. you can use GD to generate the thumbnail from the link in the table. I have a function to generate thumbnails but the forum won't let me post it.

 

Ray

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.