Welcome Guest, Not a member yet? Register   Sign In
POST variables and image upload problem in codeigniter
#1

[eluser]dhaulagiri[/eluser]
In my understanding, if we have same name and number of database fields in post form, and if we supply
Code:
$this->db->insert('db_table', $_POST);

And it's happening as well.

In those post arrays, one field is file upload, I have corrected the 'enctype' and tried the regular file upload code as below but doesn't work
Code:
if(($_FILES['image']['tmp_name'])!=''){
$data['image']='image'.$id.'.jpg';
$src_file=$_FILES['image']['tmp_name'];
$dest_file=$destination

I have spent some days still can't find out. Can anyone pls help me with example workable code ? I would be thankful.




Theme © iAndrew 2016 - Forum software by © MyBB