dropzone integration with php and sql [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


dropzone integration with php and sql [on hold]



I have here something that is missing... hi have some form to upload images made in jquery upload, and now i want to add dropzone.js to replace it.



why isn't this code working?



HTML CODE:


<script>

Dropzone.options.myDropzone= {
url: 'upload_photo_jquery.php',
autoProcessQueue: false,
uploadMultiple: true,
parallelUploads: 5,
maxFiles: 5,
maxFilesize: <?php echo $lphoto * 1000000 ?>,
acceptedFiles: 'image/*',
addRemoveLinks: true,
init: function() {
dzClosure = this; // Makes sure that 'this' is understood inside the functions below.

// for Dropzone to process the queue (instead of default form behavior):
document.getElementById("submit-all").addEventListener("click", function(e) {
// Make sure that the form isn't actually being sent.
e.preventDefault();
e.stopPropagation();
dzClosure.processQueue();
});

}
}
</script>

<form method="post" enctype="multipart/form-data" action="upload_photo_jquery3.php" name="uploadform">



<div class="dropzone" id="myDropzone">



<div class="dz-message needsclick">
Drop files here or click to upload.<br />
<span class="note needsclick">(This is just a demo dropzone. Selected files are <strong>not</strong> actually uploaded.)</span>
</div>



</div>


</form>


<button type="submit" id="submit-all"> upload </button>



upload_photo_jquery.php
CODE:


<?php

include ( "../admin/function/db.php" );

if ( ! isset( $_SESSION["people_id"] ) ) {
exit;
}

$lphoto = 0;
$sql = "select * from " . PVS_DB_PREFIX . "user_category where name='" .
pvs_result( $_SESSION["people_category"] ) . "'";
$dn->open( $sql );
if ( ! $dn->eof and $dn->row["upload"] == 1 ) {
$lphoto = $dn->row["photolimit"];
}

$tmp_folder = "user_" . ( int )$_SESSION["people_id"];
if ( ! file_exists( $DOCUMENT_ROOT . site_upload_directory . "/" . $tmp_folder ) ) {
mkdir( $DOCUMENT_ROOT . site_upload_directory . "/" . $tmp_folder );
}

require ( 'upload_photo_jquery2.php' );

$upload_handler = new UploadHandler();

$db->close();?>



It is not uploading the files to DB, i dont know what is missing here, i post the other php code in above, to see all the picture.



Thanks,
azvm



This question appears to be off-topic. The users who voted to close gave this specific reason:




Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

How to scale/resize CVPixelBufferRef in objective C, iOS