Skip to content

Instantly share code, notes, and snippets.

@RandomArray
Created October 7, 2016 21:32
Show Gist options
  • Select an option

  • Save RandomArray/b1005ec667b73afd4c21c62c875e0e9b to your computer and use it in GitHub Desktop.

Select an option

Save RandomArray/b1005ec667b73afd4c21c62c875e0e9b to your computer and use it in GitHub Desktop.
Simple test for multiple file uploads.
<!DOCTYPE html>
<html>
<body>
<meta charset="utf-8">
<title>Test Multiple File Upload POST Request</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
<form method="POST" enctype="multipart/form-data">
<!--<input type=file name="files[]" multiple>-->
<input type="file" name="uploads[]" multiple="multiple" accept="image/*">
<input type=submit value=Upload>
</form>
<?php
if(isset($_FILES) && !empty($_FILES)){
echo '<pre>';
print_r($_FILES);
echo '</pre>';
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment