In this tutorial, We will learn how to files upload on a button click in PHP dropzone. You will learn PHP dropzone file upload with submit button.

Follow some steps:

Step 1: 

Create index.php file

<!DOCTYPE html>
  <title>PHP Dropzone File Upload on Button Click Example</title>
  <script src=""></script>
  <link rel="stylesheet" href="">
  <link href="" rel="stylesheet">
  <script src=""></script>
<div class="container">
  <div class="row">
    <div class="col-md-12">
      <h2>PHP Dropzone File Upload on Button Click Example</h2>
      <form action="upload.php" enctype="multipart/form-data" class="dropzone" id="image-upload">
          <h3>Upload Multiple Image By Click On Box</h3>
      <button id="uploadFile">Upload Files</button>
<script type="text/javascript">
    Dropzone.autoDiscover = false;
    var myDropzone = new Dropzone(".dropzone", { 
       autoProcessQueue: false,
       maxFilesize: 1,
       acceptedFiles: ".jpeg,.jpg,.png,.gif"

Step 2: 

Create upload.php file


$uploadDir = 'uploads';

if (!empty($_FILES)) {
 $tmpFile = $_FILES['file']['tmp_name'];
 $filename = $uploadDir.'/'.time().'-'. $_FILES['file']['name'];


Step 3: 

Create uploads destination folder where files uploaded.

Finally you can run your application!