Welcome Guest, Not a member yet? Register   Sign In
Extend MY_Form_validation not work
#3

(This post was last modified: 07-17-2016, 11:52 PM by xenos92.)

Thanks for your reply !
I have that in MY_Form_validation file ( in application/libraries/ ) : 


PHP Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
 
class 
MY_Form_validation extends CI_Form_validation{

 
   function __construct()
 
   {
 
       parent::__construct();
 
    

   
    function handle_upload
($image,$param)
 
         
        if
(isset($_FILES['image']) && !empty($_FILES['image']['name']))
 
       {
 
           
        
}
 
       else
        
{
 
           // throw an error because nothing was uploaded
 
           $this->form_validation->set_message('handle_upload'"You must upload an image");
 
           return false;
 
       }
 
   }

Reply


Messages In This Thread
Extend MY_Form_validation not work - by xenos92 - 07-17-2016, 07:45 PM
RE: Extend MY_Form_validation not work - by xenos92 - 07-17-2016, 11:47 PM
RE: Extend MY_Form_validation not work - by PaulD - 07-18-2016, 07:32 AM
RE: Extend MY_Form_validation not work - by Narf - 07-19-2016, 03:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB