title: PHP multiple upload files, tmp_name and others has no value, form post only name of picture
body: <p>How can I get the parameters from that POST form? When I tried  </p>
  
  <pre><code>$_FILES['support_images']['tmp_name']
  </code></pre>
  
  <p>it's always empty so I can't store the path to database or fill the values.</p>
  
  <p><strong>Source code</strong></p>
  
  <pre><code>if(isset($_POST['submit']))           
  {
      extract($_POST);
  
      //sys_get_temp_dir();
      //echo "&lt;pre&gt;"; 
      //echo "POST:"; 
      //print_r($_POST); 
      //echo "FILES:"; 
      //print_r($_FILES); 
      //echo "&lt;/pre&gt;";//vypis
      //phpinfo();
  
      if(isset($_FILES['support_images']['name']))
      {
          $file_name_all="";
          for($i=0; $i&lt;count($_FILES['support_images']['name']); $i++) 
          {
              $tmpFilePath = $_FILES['support_images']['tmp_name'][$i];    
              if ($tmpFilePath != "")
              {    
                  $path = "fotky/"; // create folder 
                  $name = $_FILES['support_images']['name'][$i];
                  $size = $_FILES['support_images']['size'][$i];
  
                  list($txt, $ext) = explode(".", $name);
                  $file= time().substr(str_replace(" ", "_", $txt), 0);
                  $info = pathinfo($file);    //cesta
                  $filename = $file.".".$ext;//meno
                  if(move_uploaded_file($_FILES['support_images']['tmp_name'][$i], $path.$filename)) 
                  { 
                      $file_name_all.=$filename."*";
                  }
  
                  $filepath = rtrim($file_name_all, '*').$path;    
                  $query=mysqli_query($con,"INSERT into galeria_fotky (`img_path`,`img_name`,`img_galeria`) 
                      VALUES('".$path.$filename."','".$name."','".$_SESSION["galeria"]."'); ");
              } 
              else 
                  echo "&lt;br&gt;Obrazok sa nepodarilo ulozit :(";     
          }
      }
      else
      {
          $filepath="";
      }
  }
  
  //////////////////////////KONIEC PRIDAVANIA/////////////////////////////////////////////////
  ?&gt;
  &lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  &lt;h1&gt;Upravuješ galériu: &lt;?php echo ($_SESSION["galeria"]); ?&gt;&lt;/h1&gt;
  
  
  &lt;form action="update_galeria.php?galeria=&lt;?php echo ($_SESSION["galeria"]); ?&gt;" method="POST" enctype="multipart/form-data"&gt;
      &lt;div class="form-group"&gt;
          &lt;label class="col-md-3 control-label"&gt;&lt;h4&gt;Pridať obrázky do galérie:&lt;/h4&gt;&lt;/label&gt;
          &lt;br&gt;
              &lt;div &gt;
                  &lt;input type="file" id="file"  name="support_images[]" multiple accept="image/*" required/&gt;
              &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          &lt;label class="col-md-3 control-label"&gt;&lt;/label&gt;
              &lt;div class="submit"&gt;
                  &lt;button class="registracia" value="submit " type="submit" name="submit"&gt;Pridať&lt;/button&gt;
              &lt;/div&gt;  
      &lt;/div&gt;
  &lt;/form&gt;
  
  
  &lt;button class="registracia"  type="submit"  
  onclick="window.location.href='update_galeria.php?galeria=&lt;?php echo ($_SESSION["galeria"]); ?&gt;'"&gt;Načítať galériu&lt;/button&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>