class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I've been working on implementing it into my site and I've run into a problem. Multiple uploads. I've read the FAQ's and other posts on the forum, but I'm still lost. Here is what is going on...
I have 6 image fields on my form. Each one has been tested and they all work independently. Each has its own unique name. When processed, the class works fine and writes the file name to my database. Each image has it own row within my "users" table.
However, existing data within the db gets deleted once I upload an image to a secondary. ie.
1. Session one - the user logs in and uploads a profile picture. 2. Session two - the user logs in and uploads an image to a different row 3. The users original "profile" picture filename (in the db) gets deleted and the new one added to the appropriate row.
From what I understand, the loop is only needed if I'm uploading multiple files with the same name, correct?
Wonderful class!
I've been working on implementing it into my site and I've run into a problem. Multiple uploads. I've read the FAQ's and other posts on the forum, but I'm still lost. Here is what is going on...
I have 6 image fields on my form. Each one has been tested and they all work independently. Each has its own unique name. When processed, the class works fine and writes the file name to my database. Each image has it own row within my "users" table.
However, existing data within the db gets deleted once I upload an image to a secondary. ie.
1. Session one - the user logs in and uploads a profile picture.
2. Session two - the user logs in and uploads an image to a different row
3. The users original "profile" picture filename (in the db) gets deleted and the new one added to the appropriate row.
From what I understand, the loop is only needed if I'm uploading multiple files with the same name, correct?
Here is my form code...
and
Thanks!