Hello Fellas, I NEED SOME HELP I'm kina new in PHP and I'm here to sorta ask your opinion about something I'd like to do. Note: I'm not particulary asking for a php code or something, just a advice to know the best practice. So I want to build a photo upload form where users can upload multiple pictures, process the data received and save the images path into a mysql data table [?]. Then I will create a gallery when the user will retreive the images path and display them in this gallery. So it will be a photo album, and the gallery script will display a certain album. [?] First, How can i store multiple images paths in a single cell, is this possible? I mean when the user will upload the images these will be within a certain cell or group, so that only the pictures of a certain album are retreived and displayed. [?2] Second idea, what If I create a folder every single time a creates an album and uploads foto so something like: mysite/user/album/14/photos/ and then retreive the pictures directly via a simple php directory read script. Which of these ideas is better and why? Is there any other better idea, in terms of speed, server load etc. Please, I would highly appreciate your help. Thank you alot, Yours.
What you want to do is store the meta-information (which album has which images, paths, groups, accesscontrol etc.) in the database, and the images themselves in separate folders. How advanced you wanna make it depends on you, but you could, for instance, make it possible for a user to create his/her own folders within their user-folder, and then chose which folder to upload images to when they upload. The images the gets stored in the folder they've chosen, thumbnails are automatically created, and the information about the images (comments, paths, etc.) are stored in the database. You put one image/information in each row. NEVER EVER store multiple values in one cell in a db-table - that's bad form, and will only lead to problems.