Welcome Guest, Not a member yet? Register   Sign In
Upload multiple images, store img paths & info to db
#2

[eluser]Narkboy[/eluser]
First - don't look at this as one thing. It's 5 things:

1) Recieve form data
2) Store that into a database
3) Upload and store an image
4) Duplicate and resize the image
5) Store an image path in a database.

Work through each one seperatly. As you've said, there are many tutorials on this and you really need to work through this step-by-step to understand whats going on. If you got given the complete working code, you'd have a working script and no idea what it was doing. Not a greaat idea!

Build the product up piece by piece; recieve the form data, add it to an array. Store the image (just 1 to start with) and add the file name and location to the db arrray. Perform the copy & resize to create the thumbnail, and add those details to the db array. Add the array to the database. Done

Now go back and work out if you want batch uploads. Work out how to handle that. Easy! With that done, start adding in useful / sensible bits - max file size, file type verification, random file renames, etc to make sure that the script is safe for use.

GL! Smile


Messages In This Thread
Upload multiple images, store img paths & info to db - by El Forum - 04-13-2010, 12:11 PM
Upload multiple images, store img paths & info to db - by El Forum - 04-13-2010, 12:31 PM
Upload multiple images, store img paths & info to db - by El Forum - 04-14-2010, 01:39 AM
Upload multiple images, store img paths & info to db - by El Forum - 04-27-2010, 01:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB