Optional file uploads in form in codeigniter. Please help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Optional file uploads in form in codeigniter. Please help! (/showthread.php?tid=54404) |
Optional file uploads in form in codeigniter. Please help! - El Forum - 09-07-2012 [eluser]Unknown[/eluser] I have a small app in codeigniter. There is a form that has 3 text fields, name,email,location. This is enough to submit. However there are two optional fields to all the user to submit either an image or video or both. I have it working until there is an error with the file uploaded. It will still submit the text data, when i want it to halt the whole submission until the error is fixed. Here is the code from my controller. Any help would be great. Thanks! Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |