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.
> From what I understand, the loop is only needed if I'm uploading > multiple files with the same name, correct?
Yes. In your case, you just have a bunch of different fields, you don't have a multiple upload par se.
The rest of your problem (entries get deleted in the database) is not related to the class. You must have a problem of logic in your code. I would also recommend not using rand() to generate a filename, as you may have collisions (even though the class will rename files of the filemane already exists)Reply
> multiple files with the same name, correct?
Yes. In your case, you just have a bunch of different fields, you don't have a multiple upload par se.
The rest of your problem (entries get deleted in the database) is not related to the class. You must have a problem of logic in your code. I would also recommend not using rand() to generate a filename, as you may have collisions (even though the class will rename files of the filemane already exists)