![]() |
|
[PHP] Multi image upload - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] Multi image upload (/showthread.php?tid=5689522) |
Multi image upload - N1l0c - Aug 8, 2017 Hey HF, so I need to create an image upload which is attached to a product, so if you load the product from the DB, you're able to see the images. I've got it working with 1 image at a time but I need it to be a multi image upload. The code below shows my current upload script: Upload.php uploader.php Can anybody help me to create a multi image uploader? * - d4ne - Aug 8, 2017 So your pulling product informations from a database and now you want to upload those informations + a new picture added for each product to something else? * - Top Shotta - Aug 8, 2017 Maybe this will help : https://www.youtube.com/watch?v=q6l7KnRJQJU&list=PL0eyrZgxdwhwBToawjm9faF1ixePexft-&index=54 * - N1l0c - Aug 8, 2017 (Aug 8, 2017 08:05 AM)d4ne Wrote: So your pulling product informations from a database and now you want to upload those informations + a new picture added for each product to something else? No, people can add their product to the database. After that they chose their product and upload the images for it. * - d4ne - Aug 8, 2017 Well a example would be (Select multiple images at once inside the selection window): Source: https://stackoverflow.com/a/12006515 * - N1l0c - Aug 8, 2017 Thanks, but I need it to be working within mysql, so I can add the product ID to it in order to load the image once the product page is loaded. (See the single image upload) * - Fresku - Aug 8, 2017 (Aug 8, 2017 08:42 AM)N1l0c Wrote: Thanks, but I need it to be working within mysql, so I can add the product ID to it in order to load the image once the product page is loaded. (See the single image upload) Just take above script, edit within the for loop your sql stuff and you'll be fine. Code // Loop through each fileSomething like that * - d4ne - Aug 8, 2017 Yea as Fresku already answered, i just posted a example. The rest should be done easily. * - N1l0c - Aug 8, 2017 Ouh, yeah. I got it working. Looks like shit but works. I appreciate your help guys! * - Fresku - Aug 8, 2017 (Aug 8, 2017 08:51 AM)N1l0c Wrote: Ouh, yeah. I got it working. Looks like shit but works. No problem for the help. You can control the looks and feels of your webpage by HTML and CSS, I assume you already do know that. |