Here I have an example of me creating a string using JQuery UI sortable event I wanted to take multiple string like this
$string: item[]=4&item[]=1&item[]=2
And call back a select one to present on a page. I am planning on storing these $string 's in a MySQL table.
Basically how would I receive said $string and and use it to display something in a particular order
Here's a JSfiddle to show you what stage I'm at.
https://jsfiddle.net/mjfncugx/
HTML:
<ul id="sortable">
<li id="item_1">test1</li>
<li id="item_2">test2</li>
<li id="item_3">test3</li>
<li id="item_4">test4</li>
<li id="item_5">test5</li>
</ul>
Query String: <span></span>
JQuery UI
$(document).ready(function() {
$('ul').sortable({
axis: 'y',
stop: function(event, ui) {
var data = $(this).sortable('serialize');
$('span').text(data);
/*$.ajax({
data: oData,
type: 'POST',
url: '/your/url/here'
});*/
}
});
});