Welcome Guest, Not a member yet? Register   Sign In
Uploading a file with other information.
#1

[eluser]Unknown[/eluser]
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?
#2

[eluser]bapobap[/eluser]
I've used this:

Code:
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.




Theme © iAndrew 2016 - Forum software by © MyBB