Welcome Guest, Not a member yet? Register   Sign In
Upload and Database Question
#2

[eluser]gRoberts[/eluser]
I usually check the $_FILES array before calling the CI Upload class, i.e.

Code:
if(isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0)
{
// upload file
// set $data['file'] = $image_data['file_name'];
}

this way, only if you actually upload something does it set the `$data['file']` value.


Messages In This Thread
Upload and Database Question - by El Forum - 05-21-2012, 03:15 AM
Upload and Database Question - by El Forum - 05-21-2012, 04:01 AM
Upload and Database Question - by El Forum - 05-21-2012, 04:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB