• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploading a file with other information.

I've managed to get the system to upload an image using the example in the user guide under file-uploading_class.

However I also want to pass in a title, and description of the image into the database at the same time.

Can I still use the file uploading class, or should I just process the form submission manually?

I've used this:

if ((!$this->upload->do_upload()) OR (!$this->form_validation->run())):

Though this could be wrong. While it works for me, if you fail the validation checks for the form inputs and the page is "refreshed" to show the validation errors, the data file you selected is no longer present in the form.

No big deal for me as it isn't used a lot but it might be annoying if users need to use it a lot.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.