title: image file upload not working on wamp server
body: <p>Here is my HTML code
  "post.html"</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
  Select image to upload:
  &lt;input type="file" name="upload" id="upload"&gt;
  &lt;input type="submit" value="Upload Image" name="submit"&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is my PHP code "upload.php"</p>
  
  <pre><code>&lt;?php
  target_dir = "upload/";
  $target_file = $target_dir . basename($_FILES["upload"]["name"]);
  $uploadOk = 1;
  $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
  // Check if image file is a actual image or fake image
  if(isset($_POST["submit"])) {
  $check = getimagesize($_FILES["upload"]["tmp_name"]);
  if($check !== false) {
      echo "File is an image - " . $check["mime"] . ".";
      $uploadOk = 1;
  } else {
      echo "File is not an image.";
      $uploadOk = 0;
  }
  }
  ?&gt;
  </code></pre>
  
  <p>and the result I am getting is</p>
  
  <pre><code>File is an image - image/jpeg.
  </code></pre>
  
  <p>There is no issue with execution of the files but the thing is whenever I uploads any file or image via html code the file does not comes up in the upload folder despite of successful execution of the code.</p>
  
  <p>P.S I am using php7 on wampserver</p>