View Single Post
  #1 (permalink)  
Old 07-01-2009, 05:04 AM
nfrandsen nfrandsen is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Default Sessions and files

I am trying to create a 4 page form, where the user can input various pieces of info and upload some images and then the last form is a confirmation form where if the user confirms then its all saved to my database. Similar deal to a standard ebay form for example. Does anyone have any suggestions how best to go about this? I plan to allow users to upload images on form2, how do i take care of this in a way where they only get added if the user confirms on page4? Is there any way I can simply add the images to the Zend Session like I can with normal zend form text elements or is this not possible. Another way I was considering was to simply upload them to a temp folder named after the users id, renaming the files to timestamps and storing these filenames in the session then if user confirms, then my model can grab the filenames of the uploaded files and move them into their correct folder, resize them and store their address in the database. Is this the best way to go about it or does anyone have any better suggestions. One problem with the above approach is that my server will after a while contain a number of images in the temporary folder that have been uploaded but where the user hasn't completed the form, I would thus need to delete these later using some kind of script. This is not a big problem I guess, still if anyone has any suggestions as to any better way to tackle this problem I would love to know! Thanks
Reply With Quote