Upload Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Regional User Groups (https://forum.codeigniter.com/forumdisplay.php?fid=25) +--- Thread: Upload Error (/showthread.php?tid=69121) |
Upload Error - Germanikus - 10-11-2017 Hello, What am I doing wrong? I get this error message. Quote:An uncaught Exception was encountered Controller: PHP Code: public function insert_produckt() Model: PHP Code: public function insert_produckt($post_image) View: Code: <?php echo validation_errors(); ?> RE: Upload Error - PaulD - 10-11-2017 You have used this in your controller: PHP Code: $this->Admin_model->insert_produckt(); But in your model you have this: PHP Code: public function insert_produckt($post_image) Hence, too few arguments. i.e. You have not set the $post_image argument. Hope that helps, Paul. RE: Upload Error - InsiteFX - 10-12-2017 If you want to use it with or without a parameter, then do this. PHP Code: insert_produckt($post_image = null); RE: Upload Error - Germanikus - 10-13-2017 Thanks |