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

(06-12-2019, 01:45 AM)demyr Wrote: Probably you deleted one of the records before. So, if you are in a development period please go to phpmyadmin and clear the datas in the table. Then go to the Settings sections (top menu of phpmyadmin) and set AUTO_INCREMENT as 0, in order to start from 1, then try posting the form again.

(If I'm not wrong Auto_INCREMENET will be 0 for the start. If not, then insert 1 Smile )

The second option:  you can add+1 to your id within your php codes. But I'd go with the first one.

Finally I got The issue is with the database operations.

property_images table has fields - id,path,propertyid

propertyid is the last inserted id form the first query(Insert property details). But when i use the id to insert property images its not working.

I tried the propertyid as simply value then its working, When i use the propertyid as last inserted id which return after inserting the property details is not working.


PHP Code:
function addNewProperty($propertyInfo)

         $insert_id $this->db->insert_id();


         return $insert_id;

     function addPropertyImgs($propertyImgs)

         $insert_id $this->db->insert_id();


         //return $insert_id;


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

Theme © iAndrew 2016 - Forum software by © MyBB