Q:

no visual output after uploading file

So i've been troubleshooting for a while now, and I still just don't get it...
I'm trying to upload a file to a folder via a form:
<form id="insert_movie" action="upload_file.php" method="post" enctype="multipart/form-data">
    <label for="file">Filename:</label>
    <input type="file" name="file" id="file"><br>
    <input type="submit" name="submit" value="Submit">
</form>

I evaluate this form via 'upload_file.php':
//Upload the image
$allow = array("jpg", "jpeg", "gif", "png");

$todir = 'images/';

if(isset($_POST['submit'])){
    if ( !!$_FILES['file']['tmp_name'] ) // is the file uploaded yet?
    {
        $info = explode('.', strtolower( $_FILES['file']['name']) ); // whats the extension of the file

        if ( in_array( end($info), $allow) ) // is this file allowed
        {
            if ( move_uploaded_file( $_FILES['file']['tmp_name'], $todir . basename($_FILES['file']['name'] ) ) )
            {
                echo "this doesn't work";
            }
        }
        else
        {
            // error this file ext is not allowed
            echo "this doesn't work either";
        }
    }
}
echo "however this works perfectly";
?>

Now the problem is that it doesn't output any 'echo' that is included in the first if-statement and children, while the file is uploaded correctly.
Any help is highly appreciated!
EDIT: forgot a ';' at the end of the last echo.

A:

Edit: I learned something today about !! from The Blue Dog (comment), thanks for the added PHP quirk ;-)

"Believe it or not, !! is the same as not having them there in the first place, try it and see: $t = true; if(!! $t){ echo "true";}" // The Blue Dog

Change this line:
if ( !!$_FILES['file']['tmp_name'] ) // is the file uploaded yet?

to 
if ( $_FILES['file']['tmp_name'] ) // is the file uploaded yet?

and it will work. (tested)
Both !! should not be there. 

<?php

//Upload the image
$allow = array("jpg", "jpeg", "gif", "png");

$todir = 'images/';

if(isset($_POST['submit'])){
//    if ( !!$_FILES['file']['tmp_name'] ) // is the file uploaded yet?

    if ( $_FILES['file']['tmp_name'] ) // is the file uploaded yet?
    {
        $info = explode('.', strtolower( $_FILES['file']['name']) ); // whats the extension of the file

        if ( in_array( end($info), $allow) ) // is this file allowed
        {
            if ( move_uploaded_file( $_FILES['file']['tmp_name'], $todir . basename($_FILES['file']['name'] ) ) )
            {
                echo "Success";
            }
        }

        else
        {
            // error this file ext is not allowed
            echo "Sorry, this is now allowed.";
        }
    }

}
// echo "however this works perfectly";
?>

