Based on this example:
Dynamic Drag’n Drop With jQuery And PHP
http://www.webresourcesdepot.com/dyn...query-and-php/
I tried to make a replacement football players in the right manager

in link belowe:
http://www.sportskevesti.co/component/m ... /index.php

this is what i can do (sort). and this is something, but not good enough. Can someone help me how to this technique(jquery) make a real change of players(substitution) instead of sorting, (example in upper link)

(this is my first java attempts on this example)

I try to make online sooccer manager, and for that, i mast make soccer player substitution.
Becose of that, i search for Drag and Drop rutine, and i find this example:

Dynamic Drag’n Drop With jQuery And PHP:

The JavaScript:

Code:
<script type="text/javascript">
$(document).ready(function(){ 

$(function() {
$("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
var order = $(this).sortable("serialize") + '&action=updateRecordsListings';
$.post("updateDB.php", order, function(theResponse){
$("#contentRight").html(theResponse);
});
}
});
});

});
</script>
PHP part of code:
Code:
<?php
require("db.php");

$action = $_POST['action'];
$updateRecordsArray = $_POST['recordsArray'];

if ($action == "updateRecordsListings"){

$listingCounter = 1;
foreach ($updateRecordsArray as $recordIDValue) {

$query = "UPDATE records SET recordListingID = " . $listingCounter . " WHERE recordID = " . $recordIDValue;
mysql_query($query) or die('Error, insert query failed');
$listingCounter = $listingCounter + 1;
}

echo '<pre>';
print_r($updateRecordsArray);
echo '</pre>';
echo 'If you refresh the page, you will see that records will stay just as you modified.';
}
?>
This is drag, drop sortable example

And I need to do an example in which I will replace the players and not move one below the other.