Welcome Guest, Not a member yet? Register   Sign In
Image upload and return function problem
#6

[eluser]toopay[/eluser]
in your model, at upload function,
Code:
$uploaded_data['news_filename'] = $safe_name;
return $uploaded_data;

change to
Code:
$uploaded_data['news_filename'] = $safe_name;
$this->session->set_userdata('tmpimgfilename',$safe_name);
return $uploaded_data;

now, you can pass it to your controller like this
Code:
$post_data = array(
                'user_id'          => $this->input->post('user_id'),
                'title_original'   => $this->input->post('original_title'),
                'title'            => $this->input->post('title'),
                'title_other'      => $this->input->post('other_title'),
                'typeserie'        => $this->input->post('typeserie'),
                'date_release'     => $this->input->post('date_release'),
                'nb_episodes'      => $temp_data['nb_ep'],
                'nb_speciaux'      => $temp_data['nb_sp'],
                //'affiche'          => $uploaded_data['new_filename'],
                'affiche'          =>$this->session->userdata('tmpimgfilename')
                'country'          => $this->input->post('pays'),
                'genre'            => $genre,
                'summary'          => $this->input->post('summary'),
                'summary_source'   => $source,
                'link_official'    => $this->input->post('link_official'),
                'link_wiki_fr'     => $temp_data['link_wiki_fr'],
                'link_wiki_us'     => $temp_data['link_wiki_us'],
                'confirmed'        => $temp_data['confirmed'],
            );
like i said, this just a simple solution, because I dont know your flow process as well.


Messages In This Thread
Image upload and return function problem - by El Forum - 01-24-2011, 04:16 AM
Image upload and return function problem - by El Forum - 01-24-2011, 04:19 AM
Image upload and return function problem - by El Forum - 01-24-2011, 05:11 AM
Image upload and return function problem - by El Forum - 01-24-2011, 05:16 AM
Image upload and return function problem - by El Forum - 01-24-2011, 06:34 AM
Image upload and return function problem - by El Forum - 01-24-2011, 07:03 AM
Image upload and return function problem - by El Forum - 01-24-2011, 07:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB