how to check image is selected or not in codeigniter code example Example: check if input file is set codeigniter if (empty($_FILES['userfile']['name'])) { }