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'm not sure about two things. 1. // add your data in the database here what is it that I should put there? my INSERT query?
2. To try it out quickly, I copy/pasted your code and inserted it. Then tested with an 8k file. It was uploaded over 900 times as the script went into a loop. :)Reply
1. Yes, you can put here whatever you want to store the image name. For instance, you can INSERT into a database, using $handle->file_dst_pathname to know the name of the image. You can output $handle->log to see what are the possible variables that you can be provided with after processing an upload.
2. The code I copied in my post is only indicative. You may need to change it. How many upload fields did you have in your form? You can send me an archive of your code, and I will try to have a look at it.
I am afraid that the free support I can offer in this forum is limited to the class; your request goes a little bit beyond this scope, so my answers are quite limited to my availability.Reply
I'm not sure about two things.
1. // add your data in the database here
what is it that I should put there? my INSERT query?
2. To try it out quickly, I copy/pasted your code and inserted it. Then tested with an 8k file. It was uploaded over 900 times as the script went into a loop. :)
2. The code I copied in my post is only indicative. You may need to change it. How many upload fields did you have in your form? You can send me an archive of your code, and I will try to have a look at it.
I am afraid that the free support I can offer in this forum is limited to the class; your request goes a little bit beyond this scope, so my answers are quite limited to my availability.