Let’s say I have a simple table like that:
unique ID | url | order
unique ID is given automatically as usualy, url is something that has to be submitted.
But how can I arrange orded?
I would like a user to be able to arrange those urls in an orded he wants.
How can I achieve that? That last inserted item has always the last order number and if I move item that has order number 5 to 1 all the items order numbers change. I want to implement it with some kind of drag and drop in JavaScript, but that’s not really importat right now.
What I’m having problems with is the PHP side. To change the orded numbers.
I do exactly this, and it works fine. I use jQuery UI Sortable for the interface like this:
js:
html/php: