title: jquery draggable/droppable update database with ajax
body: <p>I have draggable divs that are created with a php loop grabbing info from a MYSQL database. code:</p>
  
  <pre><code>&lt;script&gt;
      $(function() {
          $(".box").draggable({revert:true});
          $("#trashcan").droppable({
              hoverClass: 'border',
              drop: function(event, ui) {
              $(ui.draggable).remove();
              }
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>PHP/HTML</p>
  
  <pre><code>&lt;?php
  //display boxes
      while ($list = $result-&gt;fetch_assoc()) {
  
  ?&gt;
          &lt;a href="&lt;?php echo $list['url'];?&gt;"&gt;
              &lt;div class="box"&gt;&lt;h2&gt;&lt;?php echo $list['label'];?&gt;&lt;/h2&gt;
              &lt;/div&gt;
         &lt;/a&gt;
      &lt;?php };?&gt;
  
  &lt;div id="trashcan" &gt;
    &lt;p&gt;Trash&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My question is: how can I get the PHP variable $list['label'] to be sent by Jquery as an ajax call so that I can make a revision to a MYSQL database (i.e. delete the record) after the draggable is accepted by the droppable div?</p>
  
  <p>Thanks!</p>