Welcome Guest, Not a member yet? Register   Sign In
$_FILES Array getting empty when using $this->form_validation->run()
#8

When you get to the point of sending 

Code:
$data = array('your_column'=>$variable);

 to the database, do not output the result. Create another $data, for example : $data2 

Code:
$data2 = array('your_column_about_image'=>$variable_for_image);

They both should have the same query name. For example $my_result 

Code:
$data = array(bla bla);
$this->load->models('My_Backend_Model');
$my_result = $this->My_Backend_Model->lets_insert_form_post($data);

-- dont go if($my_result){} here-- 

start your secont $data2 : 
Code:
$data2 = array(bla bla);
$this->load->models('My_Backend_Model');
$my_result = $this->My_Backend_Model->lets_upload_photo($data2);

 
then run your checking code : 

PHP Code:
if($my_result){
 
  $this->session->set_flashadata('done','bla bla');
 
  redirect('somewhere');
}else{
 
 bla bla

Reply


Messages In This Thread
RE: $_FILES Array getting empty when using $this->form_validation->run() - by demyr - 06-11-2019, 10:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB