Jump to content

Recommended Posts

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.

 

Link to comment
https://forums.phpfreaks.com/topic/43692-need-ideas-for-a-solution/
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.