Welcome Guest, Not a member yet? Register   Sign In
failed to upload image file and save data
#33

[eluser]cestaz18[/eluser]
[quote author="theprodigy" date="1263984035"]Please update your controller. In your post() method, I still see:

Quote:$fields = array(
"module_name"=>$this->input->post('module_name'),
"slug"=>$this->input->post('slug'),
"icon"=>$this->input->post('file_name'),
"report_file_name"=>$this->input->post('report_file_name'),
"sql_select"=>$this->input->post('sql_select'),
"sql_filter"=>$this->input->post('sql_filter'),
"sql_order"=>$this->input->post('sql_order')
);

In your view, I also only see:

Quote:<div class="infield">
&lt;?php echo form_open_multipart('at_reports/post');?&gt;
&lt;input type="file" name="userfile" class="tb" title="&lt;?=lang('icon');?&gt;"/&gt;
&lt;input type="submit" value="upload" /&gt;
&lt;!--&lt;/form&gt;--&gt;
&lt;!--&lt;input type="text" name="icon" class="tb" title="&lt;?=lang ('icon');?&gt;" /&gt;--&gt;
</div>

The controller part needs to be updated with the fact that you cannot retrieve the file name from the $this->input->post() method. It simply isn't there. You need to get the file name from the $file_data array.

In your view, it doesn't look like the form elements are all there, and you aren't closing your form tag (the close form tag is commented out, as is the icon input field). Am I not seeing the full form? Do you have other parts of the form being added on later?[/quote]



i'm little confuse of what ur telling..
"icon"=>$this->input->post('file_name'), ..in this code..i follow only wat u said a while a go..you compare it to our code and i copy wat u said to change..


in my view...
i already remove the comment in form closing tag...the same with icon input field..but the same error i got..no value has been save in my icon and file_name field in my database...only the other field has been succesfully save..

can u show me the code u want to tell??..tnx


Messages In This Thread
failed to upload image file and save data - by El Forum - 01-18-2010, 09:41 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 09:53 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 09:57 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 10:05 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 10:10 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:23 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:30 PM
failed to upload image file and save data - by El Forum - 01-18-2010, 11:35 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 12:09 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 12:22 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 03:34 AM
failed to upload image file and save data - by El Forum - 01-19-2010, 06:50 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:23 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:39 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 07:43 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:08 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:17 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:22 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:33 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:37 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:43 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:46 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:48 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:50 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:51 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 08:56 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 10:40 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:04 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:06 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:07 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:11 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:18 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:26 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:38 PM
failed to upload image file and save data - by El Forum - 01-19-2010, 11:56 PM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:01 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:09 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:17 AM
failed to upload image file and save data - by El Forum - 01-20-2010, 12:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB