mothra
11-09-2006, 05:22 PM
I have a php front end to a mysql database that I developed for use at work. Our employees can add and remove items from the database, which represents a list of parts we have on our shelf. I have been asked to add one (or more) pictures for each record in the database.
Before I start working on this I wanted to ask if anyone has a recommendation on the best method to acomplish this. I was thinking about just uploading the images to a directory under our web root, and store the file names in the database, maybe have up to 3 pics per record. When the table is built to display all the available items I'd just add the required links.
Does this sound OK?
I know from setting up Gallery they recommend NOT putting the images directory under the webroot (for security reasons I believe?). I had considered this but honestly I don't know why I'd need to, and on top of that I don't know how to upload to directories above my web root (any tips appreciated).
One other thing I had considered is renaming the images to match the ID in the database. We actually print the ID out and tag the parts with it, so it might be nice to rename the images with the corresponding ID. I don't know exactly how to do this, although I'm sure it can't be difficult.
Any suggestions and feedback that will save me some time and headache are appreciated.
Before I start working on this I wanted to ask if anyone has a recommendation on the best method to acomplish this. I was thinking about just uploading the images to a directory under our web root, and store the file names in the database, maybe have up to 3 pics per record. When the table is built to display all the available items I'd just add the required links.
Does this sound OK?
I know from setting up Gallery they recommend NOT putting the images directory under the webroot (for security reasons I believe?). I had considered this but honestly I don't know why I'd need to, and on top of that I don't know how to upload to directories above my web root (any tips appreciated).
One other thing I had considered is renaming the images to match the ID in the database. We actually print the ID out and tag the parts with it, so it might be nice to rename the images with the corresponding ID. I don't know exactly how to do this, although I'm sure it can't be difficult.
Any suggestions and feedback that will save me some time and headache are appreciated.