Help - Search - Members - Calendar
Full Version: Multiple Forms and Uploads?
Pixel2Life Forum > Help Section > PHP, ASP, MySQL, JavaScript and other Web/Database Programming Help
Blambu
Hey guys,

I need some assistance with a form I'm trying to submit.

SO far I've made a databse for the form, however, i'm going to scrap it and look at everything from a different angle and im hoping you guys will be able to help me on that.

Please take a look at http://www.limecoding.com/svn/pressawards/form.html

What I need the form to do, is upload all of the files into the /uploads folder, and put the details of the forms into a databse, assigning which user uploaded it, and what category the upload was under.

You can see there are many categories and file uploads.

How would I go about doing this?


I don't understand how I'd be able to insert the file into what category once it is submitted.


Can you guys help?


Thank you very much!



Jamie
Demonslay
Well, when you receive files on the PHP end, I'm sure you are aware they are located in the $_FILES super-global array. Since each upload box should have its own name attribute, you can access them independently. Upload everything to your directory as planned, but in your database keep track of what category it was for with its file path, depending on which field the upload was from.

I can give you a pseudo-code example later if that didn't help, I'm just a bit busy right now and thought I'd pitch this bit in for now.
Blambu
QUOTE (Demonslay @ Oct 5 2009, 12:01 AM) *
Well, when you receive files on the PHP end, I'm sure you are aware they are located in the $_FILES super-global array. Since each upload box should have its own name attribute, you can access them independently. Upload everything to your directory as planned, but in your database keep track of what category it was for with its file path, depending on which field the upload was from.

I can give you a pseudo-code example later if that didn't help, I'm just a bit busy right now and thought I'd pitch this bit in for now.


Thanks, yeah. Sounds cool


I haven't worked with file uploads before, so I'm not 100% sure on them, so anything else you can throw my way would be a bonus smile.gif


Thanks a lot
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.