whhhhaaaazzzzuuuuuppppppp
New member
I use a form to upload an image, and then it has a random number generated for its name. It's then moved into a folder named uploads.
How can I reference a particular item in my database with an image in the uploads folder?
Basically, i have a database full of product information, and I want to link say for example, a chair with the uploaded image of a chair.
It is proving difficult since an image is assigned a number and not a more obvious name of chair.jpg.
Numbering is still the way it needs to be done as it would get more complicated if there were 2 chairs, 3 chairs 4 chairs etc.
An obvious way to do it would be to have a column in the database called image and in there was the number that corrosponded with the uploaded image. But since the number is random I can't foresee what it will be so it has to somehow get in to the database after the image has been uploaded and renamed.
Can you save the day and help me out please?
How can I reference a particular item in my database with an image in the uploads folder?
Basically, i have a database full of product information, and I want to link say for example, a chair with the uploaded image of a chair.
It is proving difficult since an image is assigned a number and not a more obvious name of chair.jpg.
Numbering is still the way it needs to be done as it would get more complicated if there were 2 chairs, 3 chairs 4 chairs etc.
An obvious way to do it would be to have a column in the database called image and in there was the number that corrosponded with the uploaded image. But since the number is random I can't foresee what it will be so it has to somehow get in to the database after the image has been uploaded and renamed.
Can you save the day and help me out please?