title: How to sort images in jquery/php/mysql same as google picassa reorder interface?
body: <p>I am using PHP/MYSQL.</p>
  
  <p>I want to create a image gallery for sorting images. User will drag and drop images to sort and organize their images. Just like picassa do this. </p>
  
  <p>I have created a page using using jQuery UI sortable plug-in: <a href="http://jqueryui.com/demos/sortable/#display-grid" rel="nofollow noreferrer">http://jqueryui.com/demos/sortable/#display-grid</a></p>
  
  <p>Demo Page: <a href="http://jsbin.com/oqani/9/" rel="nofollow noreferrer">http://jsbin.com/oqani/9/</a></p>
  
  <p>Its dragging and dropping the images properly. But I am not able to get the current order of the images after user done with sorting images. Once I'll get current order I have to save that order in db for that particular image.</p>
  
  <p>Suppose I have images <strong>1, 2, 3, 4, 5, 6, 7, 8, 9</strong> order then I resorted images and the order became <strong>1, 3, 4, 7, 8, 2, 5, 6, 9</strong>. So on click of "Show Order" button it should show me the order as <strong>1, 3, 4, 7, 8, 2, 5, 6, 9</strong>.</p>
  
  <p>Can anyone please help me to show the current order of the images on click of "Show Order" button and also provide me some concept of how I'll put the current order for a particular image in DB.</p>
  
  <p>Thanks</p>