Welcome Guest, Not a member yet? Register   Sign In
Sortable lists using PHP
#2

[eluser]rogierb[/eluser]
well, one not so beautiful approach

Add a field to your tabel called 'order' to define the order.
Create a form for each up/down arrow. In this form, create 3 hidden fields
1: record_id
2: order + or -
3: upper/lower record_id depending on up/down arrow


On submit, update your record id with the new order,
Then update the other records (upper or lower) with their new order.

It is far more easy to do by javascript thought


Messages In This Thread
Sortable lists using PHP - by El Forum - 10-08-2009, 12:52 AM
Sortable lists using PHP - by El Forum - 10-08-2009, 01:44 AM
Sortable lists using PHP - by El Forum - 10-08-2009, 02:39 AM
Sortable lists using PHP - by El Forum - 10-08-2009, 02:52 AM
Sortable lists using PHP - by El Forum - 10-08-2009, 02:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB