Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Profile:
- <input type="file" name="uploads[]" multiple>
- <input type="submit" name="fupload" value="Upload"><br><br>
- if(isset($_POST['fupload']))
- {
- $target_dir="uploads/";
- if(!empty(array_filter($_FILES['uploads']['name'])))
- {
- foreach($_FILES['uploads']['tmp_name'] as $key=>$value)
- {
- $tmp_file=$_FILES['uploads']['tmp_name'][$key];
- $target_file=$_FILES['uploads']['name'][$key];
- $path=$target_dir.$target_file;
- if(move_uploaded_file($tmp_file,$path))
- echo "$target_file successfully uploaded <br>";
- else
- echo "Error uploading $target_file <br>";
- }
- }
- else
- echo "No such file is selected";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement