Forum Moderators: coopster
I really need a script like this, it's important to know that i am a newbie, but i understand simple/medium code!
Thanks in advance!
Though not a tutorial or how to, any task is not so complex when you break it down into it's parts.
Start with a small test script that uploads. Get it working.
Now, you will most likely want to resize the images, or create thumbnails. To your original script, create a second that does this.
Now, let's think about the path to the images. Obviously you will have a constant for the "uploaded images path" but will have to devise a way to set image file names, or extract them from the uploaded file. Alter your second script to do this, and echo back the file names to the page. Get that working.
Now set it aside for a bit and figure out how to access mySQL. Create a test database, create a table with a text field, get user input from a form to add to the field. You might extend this to something that will CHECK for an existing value in the database first; in the case of images you don't want someone's "logo.jpg" overwriting someone else's "logo.jpg." This may require going back to script three and rethinking how you set the names.
Once this is working, create another script that combines the file upload, setting the file name, and storing the file name in the database.
Now all you have to do is create loops: a loop to output 6 upload fields in your form, and on submit, look for/upload/resize the 6 images, store the 6 file names in the database.
There's lots of little things you'll encounter - error checking, how to display the images, etc. - but break it down like this and in a week or so your application should be working.