oalvarado Posted February 14, 2013 Share Posted February 14, 2013 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: the user fills out the form and in the form he/she uploads images and then submits the form 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. (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. Quote Link to comment Share on other sites More sharing options...
Barand Posted February 15, 2013 Share Posted February 15, 2013 Create a table "images", say, and store the user_id and image info (eg name) in that, one image per record images User_id | image_info Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.