Created
January 17, 2020 12:58
-
-
Save Ghostff/911cbf838c74da710efc58d5cb30d6af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var_dump($_POST); // empty on reload. | |
if (isset($_POST['upload'])) | |
{ | |
$selected = $_FILES['files']['tmp_name']; | |
foreach ($selected as $tmp_name) { | |
var_dump($tmp_name); | |
} | |
} | |
else | |
{ | |
echo <<< 'HTML' | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<form method="post" enctype="multipart/form-data"> | |
Select images: <input type="file" name="files[]" multiple> | |
<input type="submit" name="upload"> | |
</form> | |
</body> | |
</html> | |
HTML; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment