Jump to content


Multiple Forms and Uploads?


2 replies to this topic

#1 Blambu

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 04 October 2009 - 02:29 PM

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.limecodin...wards/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

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 04 October 2009 - 06:01 PM

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.

#3 Blambu

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 05 October 2009 - 10:56 AM

View PostDemonslay, on Oct 5 2009, 12:01 AM, said:

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 <3


Thanks a lot





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users