Sending verified image into db

I am trying to send verified images into my database but it does not work. The program generates Error 303 . Kindly check it.

Here is an excerpt from my code:

<?php
if (isset($_POST['newpost_sub'])){

$date = date('y-m-d h:i:s');
$title =   strip_tags( $_POST['title']);
$description = $_POST['description'];
$category = $_POST['category'];
$author = $_POST['author'];


if ( $_FILES['image']['error'] == 0){
    if ($_FILES['image']['size'] <= 8000000 ){
        $typeArray = ['image/png' , 'image/gif' , 'image/jpeg' , 'image/jpg'];

        if (in_array($_FILES['image']['type'] , $typeArray) &&   is_array(getimagesize($_FILES['image']['tmp_name']))){

            $tmp_array = explode("." , $_FILES['image']['name']);
            $filename = time().'.'.rand(100,100000).'.'.end($tmp_array);
            $image = "../'img/'.$filename";

            if (move_uploaded_file($_FILES['image']['tmp_name'] ,'img/'.$filename )){

                $ins_sql = "INSERT INTO `post` (`title` , `description` , `image` , `category` , `date` , `author`) 
                            VALUES ('$title' , '$description' , '$image' , '$category' , '$date' , `$author`)";

                 if (mysqli_query($conn,$ins_sql)){
                     header("location:postlist.php");
                 }else{

                     echo 'something wrong';
                 }

            }else{

                echo 'Error 303';
            }

        }else{
            echo 'Wrong Type';
        }
    }else{
        echo 'The File Is Too Big';
    }
}
}

Please help.