arunpatal Posted April 1, 2014 Share Posted April 1, 2014 (edited) Hi, I am uploading multiple files <form enctype="multipart/form-data" method="post"> <input type="file" name="gallery[]" multiple="multiple" /> <input type="submit" value="Update" name="gallery_submit" /> </form> But if not empty statement is not working with it if (!empty($_FILES["gallery"]["name"])){ $mysql->upload_gallery_img($gallery1); } I want that when file is selected then only the upload_gallery_img function runs Edited April 1, 2014 by arunpatal Quote Link to comment Share on other sites More sharing options...
Solution arunpatal Posted April 1, 2014 Author Solution Share Posted April 1, 2014 Ok the problem was solved like this $add_gallery = array_filter($_FILES["gallery"]["name"]); if(!empty($add_gallery)) { code } else { }; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.