# Weird empty($\_FILES\[imagefile'\]) problem

**URL:** <https://forum.kirupa.com/t/weird-empty--files-imagefile-problem/233760>\
**Category:** Uncategorized\
**Created:** [July 26, 2007, 5:16pm UTC](https://forum.kirupa.com/t/weird-empty--files-imagefile-problem/233760 "2007-07-26T17:16:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhunt](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mhunt](https://forum.kirupa.com/u/mhunt)\
**Post date:** [July 26, 2007, 5:16pm UTC](https://forum.kirupa.com/t/weird-empty--files-imagefile-problem/233760/1 "2007-07-26T17:16:06Z")

</div>

I have this form that can upload an image, movie, and an mp3, but none of them are required so i have this for the movie and same thing for mp3 just different var names. The thing that isn’t working is if i don’t browse to anything in the video or mp3 section it still does the stuff that is in the script below when it shouldn’t. Any ideas?

```php

if(!empty($_FILES['movfile'])) {
            include('mov_work.php');
            $vars = uploadMovie($_FILES['movfile'], "pr");
            $ms = explode(":", $vars[2]);
            $m = "INSERT INTO mov VALUES('', '{$ms[0]}', '${ms[1]}', '{$mov_title}', '{$mov_content}', NOW(), '{$month}', '{$day}', '{$year}', '{$vars[0]}', '{$pub}', '{$vars[1]}', '{$vars[3]}', '{$vars[2]}')";
            //$m_id = mysql_insert_id();
        } 

```
