Welcome Guest, Not a member yet? Register   Sign In
How do I validate that a file has been selected.
#11

[eluser]InsiteFX[/eluser]
Try this:
Code:
if ( ! empty($this->upload->data('file_name')))
{
    return TRUE;
}
else
{
    return FALSE;
}

InsiteFX
#12

[eluser]DaTran[/eluser]
It doesn't work and this is why. I don't upload the image before checking. I check to see if the user has selected a file to upload or not. Can this not be done server side? Or do I have to reseort to some jquery to make sure the user selects an image and expect an image?




Theme © iAndrew 2016 - Forum software by © MyBB