未定义索引:第12,15,16,17,18,19,20行中的文件

I get errors in this part to upload a file image into a folder an after that save in database, help me please

  11   $allowedExts = array("gif", "jpeg", "jpg", "png");
  12   $temp = explode(".", $_FILES["file"]["name"]);
  13   $extension = end($temp);
  14
  15   if ((($_FILES["file"]["type"] == "image/gif")
  16   || ($_FILES["file"]["type"] == "image/jpeg")
  17   || ($_FILES["file"]["type"] == "image/jpg")
  18   || ($_FILES["file"]["type"] == "image/pjpeg")
  19   || ($_FILES["file"]["type"] == "image/x-png")
  20   || ($_FILES["file"]["type"] == "image/png"))
       && ($_FILES["file"]["size"] < 100000)
       && in_array($extension, $allowedExts)) {
       if ($_FILES["file"]["error"] > 0) {
       echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
      } else {
      if (file_exists("../img/propieties/" . $_FILES["file"]["name"])) {
        echo $_FILES["file"]["name"] . " already exists. ";
      } else {
        move_uploaded_file($_FILES["file"]["tmp_name"],
        "../img/propieties/" . $_FILES["file"]["name"]);
      }
      }
      } else {
       echo "Invalid file";
      }

I got a element input normal into a form with method POST

<input type="file" name="file" id="file">

You're probably missing your enctype="multipart/form-data" attribute in your <form> tag. Without it the file will not upload.

<form enctype="multipart/form-data" action="" method="post">