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

Hey again.

Take this part out of your codes: 
Code:
 if($result > 0)

              {

                 //$propertyImgUpload = uploadImages($result);
                  $this->session->set_flashdata('success', 'Thank you for submiting your property with us!, Our team will contact you shortly');
              }
              else
              {
                  $this->session->set_flashdata('error', 'Submission of property failed, Contact [email protected]');
              }
 


And add $result= here, just before the $this->property_model->addPropertyImgs($imgData);

Code:
if(move_uploaded_file($tempFile, $targetFile))
               {


                   $result = $this->property_model->addPropertyImgs($imgData);


               }

and then run checking 

Code:
if($result)

              {

                 //$propertyImgUpload = uploadImages($result);
                  $this->session->set_flashdata('success', 'Thank you for submiting your property with us!, Our team will contact you shortly');
              }
              else
              {
                  $this->session->set_flashdata('error', 'Submission of property failed, Contact [email protected]');
              }

In short, 2 $result variables will check for the same result.
Reply


Messages In This Thread
RE: $_FILES Array getting empty when using $this->form_validation->run() - by demyr - 06-12-2019, 03:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB