title: Picture uploading proble
body: <p>I don't have an idea why it doesn't upload pictures(But the same peace of code does). Please help me.
  HTML:</p>
  
  <pre><code>$max_filesize = 524288;
  $upload_path = './img/';
  $id=$_POST["id"];
  
  for ($i=1; $i&lt;=3; $i++)
  {
      (string)$inside="inside".$i;
      echo $inside;
      $filename = $_FILES[$inside]['name'];
      echo $filename;
      $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1);
      echo $ext;
  
      if (isset($_POST[$inside])){
  
          if(filesize($_FILES[$inside]['tmp_name']) &gt; $max_filesize)
              die('File is too big.');
  
          if(!is_writable($upload_path))
              die('Cannot access folder - 777.');
  
          if(move_uploaded_file($_FILES[$inside]['tmp_name'],$upload_path . $id . "inside" . $i . $ext))
          {
              echo 'Uploaded successfuly ';
              echo '&lt;br&gt;&lt;br&gt;';
              echo '&lt;img src="' . $upload_path . $filename . '" width="300" &gt;';
          } else {
              echo 'Something went wrong, try again.';
          }
      }
  }
  </code></pre>
  
  <p>Before that:</p>
  
  <pre><code>&lt;form method="post" enctype="multipart/form-data" action=""/&gt;
      Що в коробці(Фото): &lt;p&gt;
      &lt;input type="file" name="inside1"
            accept=".jpg, .jpeg, .png"&gt; &lt;p&gt;
      &lt;input type="file" name="inside2"
            accept=".jpg, .jpeg, .png"&gt; &lt;p&gt;
      &lt;input type="file" name="inside3"
            accept=".jpg, .jpeg, .png"&gt; &lt;p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>It says 'Something went wrong, try again.'.</p>