Welcome Guest, Not a member yet? Register   Sign In
File upload then store in database with title and description
#4

[eluser]TheFuzzy0ne[/eluser]
I guess it's best to do it the way you're users will find easiest. If you want allow users to upload images without a title and description, then 2 forms would probably work quite well, otherwise you're likely to experience anomalies where images have no corresponding database entry (which, of course, can be coded around).

Yes, you would just need to do a database insert from your upload controller - after you've validated the users input, of course. Smile

I'm not sure how this sounds to you, but if you did it the other way around, where the user specifies the title and description before they upload the image, you could store the title and description in the cookie, and then use that once the image has been uploaded. If an image is uploaded, and the cookie data is not there, then the user has not arrived via the previous page. Obviously, with multi-page forms, this is something you need to bear in mind. It's easy enough to code around, however, by checking for the data in the cookie, and doing a simple redirect to the previous page if it doesn't exist.


Messages In This Thread
File upload then store in database with title and description - by El Forum - 05-17-2009, 08:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB