Image Upload and Text Inputs in Same CodeIgniter Form Image Upload and Text Inputs in Same CodeIgniter Form codeigniter codeigniter

Image Upload and Text Inputs in Same CodeIgniter Form


You're getting the inputs from the $_POST array and the file from the $_FILES array. There's nothing that should keep you from doing both on the same form.

That being said, you will have to handle errors differently, as upload errors won't show up with the validation errors. What I've done in the past is combined upload errors, validation errors, and my own application errors (ie unauthorized) to use the same view so they all show up in the same place, even if they are being generated by different classes.