hi Bhashkar, I have been trying to get this thing to work, unfortunately I can’t seem to figure out how to get this to modify the entry in the database (I’m using Matrix for each entry). Below is some PHP that I found online that should do the trick, but I’m not sure how I can connect this to my database. the other issue is that this PHP is being called from within JavaScript. My PHP skills are very limited. Any suggestions?
This is the JavaScript
————————————————————-
[removed]
// When the document is ready set up our sortable with it's inherant function(s)
$(document).ready(function() {
$("#test-list").sortable({
handle : '.handle',
update : function () {
var order = $('#test-list').sortable('serialize');
$("#info").load("process-sortable.php?"+order);
}
});
});
[removed]
This is the PHP being called in from the JavaScript
—————————————————————
<?php
foreach ($_GET['listItem'] as $position => $item) :
$sql[] = "UPDATE `table` SET `position` = $position WHERE `id` = $item";
endforeach;
print_r ($sql);
?>