Jump to content

Multiple Image upload / help with MySQL table


oalvarado

Recommended Posts

Hello everyone.

 

First and foremost sorry if this question is posted in the wrong topic but its a mix from php and MySQL.

The question in mind is using php, how do I get the files from the upload folder to go into a DB table, when the user uploads the images there is a min of one image and a max of 8; now those files need to go in a table but I'm somewhat confused if I need to create a new table for the images with one file per column or do I create a new column on the existing table holding all of the user's data and insert the files in that table.

 

Practically the idea is below:

  1. the user fills out the form and in the form he/she uploads images and then submits the form
  2. the php side of the form starts the process of inserting the users info into the main table "listings" and uploads images to upload folder <-- done works properly.
  3. (my bright idea comes here but cant really understand how it would work) 2nd. process : get listing id from main table to crate new directory for images, then gets the uploaded images and places them in that directory, during the move operation it populates either the contemplated table for images or it inserts the images to main table, that way when a viewer opens the listing there is a image gallery for what ever the listing is for.

I hope I didn't confused anyone here with my question and thanks in advance to whom ever can understand my way of thinking.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.