Dropzone php mysql Example with Demo

Today, We want to share with you Dropzone php mysql Example with Demo.In this post we will show you Dropzone Multiple Image upload validation, hear for Laravel Dropzonejs Multiple File Upload using jQuery we will give you demo and example for implement.In this post, we will learn about DropzoneJS send additional data Multiple File Upload with an example.

Simple Dropzone php mysql Example with Demo

There are the Following The simple About Simple Dropzone php mysql Example with Demo Full Information With Example and source code.

As I will cover this Post with live Working example to develop filestack – DropZone Allowed File Extensions Tutorials, so the How to display existing files on server in Dropzone js using PHP for this example is following below.

Also Read This πŸ‘‰   delete button javascript - How to add and remove names on button click with JavaScript?

Create Index.php File:

<!DOCTYPE html>
    <title>jQuery Ajax Dropzone display uploaded files on server PHP - Pakainfo.com</title>
    <script src="jquery/3.3.1/jquery.min.js"></script>
    <link href='dropzone/5.4.0/dropzone.css' type='text/css' rel='stylesheet'>
    <script src='dropzone/5.4.0/dropzone.js' type='text/javascript'></script>
    <style type="text/css">
      .dz-preview .dz-image img{
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
<div class="container pakainfo" >
  <h1>jQuery Ajax Dropzone display uploaded files on server in PHP <BR/> Pakainfo.com</h1>
  <div class='content'>
    <form action="do_multipleFilesUplodad.php" class="dropzone" >  
<script type="text/javascript">
  Dropzone.autoDiscover = false;
    init: function() { 
      liveDropzone = this;
        url: 'do_multipleFilesUplodad.php',
        type: 'post',
        data: {request: 'get_request'},
        dataType: 'json',
        success: function(response){
          $.each(response, function(key,value) {
            var mockFile = { name: value.name, size: value.size};
            liveDropzone.emit("addedfile", mockFile);
            liveDropzone.emit("thumbnail", mockFile, value.path);
            liveDropzone.emit("complete", mockFile);

Create Index.php File:

/* Upload PHP To directory Moves*/
$finalDirdata = "upload/";
$destination_path = "upload";
  $request = $_POST['request'];
/* Upload file */
if($destination_path == "upload"){
  $msg = "";
  if (move_uploaded_file($_FILES["file"]["tmp_name"], $finalDirdata.$_FILES['file']['name'])) {
    $msg = "Successfully uploaded";
    $msg = "Error while uploading";
  echo $msg;
/* Read files from */
if($request == 'get_request'){
  $allFiles = [];
  $is_dir = $finalDirdata;
  if (is_dir($is_dir)){
    if ($dh = opendir($is_dir)){
      while (($file = readdir($dh)) !== false){
        if($file != '' && $file != '.' && $file != '..'){
          $file_path = $finalDirdata.$file;
             $size = filesize($file_path);
             $allFiles[] = ['name'=>$file, 'size'=>$size, 'path'=>$file_path];
  echo json_encode($allFiles);

Angular 6 CRUD Operations Application Tutorials

Read :

Also Read This πŸ‘‰   javascript post data to url


You can also read about AngularJS, ASP.NET, VueJs, PHP.

Free Live Chat for Any Issue

I hope you get an idea about Simple Dropzone php mysql Example with Demo.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Rate this post