s0c0 Posted March 21, 2007 Share Posted March 21, 2007 I have a javascript/html form that allows a user to specify multiple files for upload. This is passed into a php script that loops through each files and uploads them. The caveat with this is my program needs to have certain meta-data regarding the files stored in a mysql database. When this was just a one file upload form it was fine as the user would be taken to another form after submitting the file that would update the files record in mysql. Since I am now taking multiple files I am grappling with the many different ways of doing this and deciding on which is the best way. What is the best way to accomplish this? I can think of two right off the top of my head. 1. Once the files are uploaded store the files path in variables and take the user to the record update form, each time the user submits a record pass the next files path in a URL string until there are no more files left. 2. Every time a user adds a file to be uploaded (it has not been uploaded at this point) show the record update fields next it. Then pass all the information at once. Solution 1 seems like the easier and more half-assed solution. Solution 2 seems like the more elegant/web 2.0 solution, but will take more much longer to implement. Since I am not in the business of half-assing stuff I would go with solution 2, but I am very interested in your ideas and the possibility of more solutions. Quote Link to comment Share on other sites More sharing options...
Barand Posted March 21, 2007 Share Posted March 21, 2007 Not only is option 2 more elegant, it also seems to be the easier. 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.