Welcome Guest, Not a member yet? Register   Sign In
[HELP] upload
#6

[eluser]LuckyFella73[/eluser]
It's like InsideFX said - look here:
Code:
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());

// uploading failed. $error will holds the errors.
}
else
{
$data = array('upload_data' => $this->upload->data());
}

No matter if the uload was successful or not you just
assign the upload data to $data. You have to call a view
and diplay something like uploads data or a message like
"all fine" or "upload failed".

You better let your model return "FALSE" in case the upload failed
and return the upload data in case the upload was successful.
In your controller you call the model and call a view depending
an what your model returned.


Messages In This Thread
[HELP] upload - by El Forum - 07-19-2012, 03:07 AM
[HELP] upload - by El Forum - 07-19-2012, 03:45 AM
[HELP] upload - by El Forum - 07-19-2012, 03:51 AM
[HELP] upload - by El Forum - 07-19-2012, 03:59 AM
[HELP] upload - by El Forum - 07-19-2012, 04:03 AM
[HELP] upload - by El Forum - 07-19-2012, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB