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!

Link to comment
Share on other sites

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

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.