Based on this example:
Dynamic Drag’n Drop With jQuery And PHP
I tried to make a replacement football players in the right manager

in link belowe: ... /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:

<script type="text/javascript">

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

PHP part of code:

$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>';
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.