Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm new to PHP and MySQL and I've only seen posts related to this on Zend and ASP so I'm looking for some advice to point me in the right direction for a LAMP project.

I'm putting together a webform for a project of mine that logged in users will access to upload a submission. Each user will reuse previously uploaded files for each submission. At the bottom of the form the user can upload multiple files. Images, spreadsheets, and pdf's, etc. but I would like to give them access to files they have uploaded before rather than having to resubmit all new files for each submission.

My question is what is your advice on accomplishing this? I figure I could have each user create a library of files that they could access from the form in some way. Maybe a list of files with checkboxes to select previously uploaded files? I haven't found much here or on Google so I'm not sure if there is a standard way to handle something like this.

Note that the users will only be reusing only their own images, not those of the community. If it makes a difference I'm storing the images in MySQL as BLOB's. Thanks for any advice and information.

share|improve this question
2  
What sort of answers are you expecting? Are you looking for code or conceptual advice/pointers? –  Anna Lear Dec 27 '11 at 23:32
    
I'll start with the conceptual ideas and see if I can tackle it on my own. I just dont want to spend time on a script that makes no sense to implement. What I'm looking for is conceptually, how do you handle this in your projects? Thanks! –  Dev Newb Dec 27 '11 at 23:43
    
For questions about how to present the information to the user the User Experience site is a good choice too. Please review their FAQ and browse the site before posting. –  ChrisF Dec 28 '11 at 0:48
add comment

1 Answer

up vote 2 down vote accepted

Firstly, I'd stop storing your files as BLOBs - you already have a filesystem on your computer, and it isn't efficient to have MySQL act like a filesystem - just store the filepath in the database.

So, as for 'select previous files' - a list of filenames and checkboxes would be the simplest way forward - but that list could become quite long if they are a particularly active uploader. You'd probably want to be able to scroll the list independent of the form (using the CSS overflow attribute on a container element for the list of filenames) - maybe even a filter input (javascript).

As ChrisF mentions in his comment - there is an SE for User Experience, or you can try and think of other sites that do something similar.

share|improve this answer
    
Thanks for the feedback. –  Dev Newb Dec 28 '11 at 3:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.