I am building a dropbox like application with php and javascript. I am trying to build a delete function to delete multiple files and folders at once. The code below demonstrates each and every row. This was done in php to dynamically display all folders stored in the server:
<?php
foreach ($files as $file) {
echo '<li class="browse-file">
<div class="select-all-col"><input name="select" type="checkbox" class="select" id="'.$file.'"/></div>
<div class="file-name-col"><a href="my-home.php?name='.$folderName."/".$file.'" style="cursor: pointer;">'.$file.'</a></div>
<div class="kind-col">folder</div>
<div class="date-modified-col">'.date ("F d Y H:i:s.", filemtime($_SESSION['currentDir']."/".$file)).'</div>
<br />
</li>';
}
?>
The following is a link to delete all the checked folders:
<a href="#" id="delete">Delete</a>
I need some code that iterates through all the check boxes and than gets those that are checked to send them to the server. The server than deletes those folders/files. Can anyone please suggest me what I can do to achieve this?