I'm creating a menu from a db, where for example 'category1' will link to 'category1.php'. No problems at all with that. my problem is the order of those db contents. I want to be able moving the different categories up and down. e.g
category1 [U]move down[/U]
category2 [U]move up[/U]/[U]move down[/U]
category3 [U]move up[/U]/[U]move down[/U]
category4 [U]move up[/U]/[U]move down[/U]
category5 [U]move up[/U]
so when you click on category2-move up the order should be:
category2
category1
category3
category4
category5
My thought on this is when clicking on a link to move up or down, to swap the ids of those two categories. I don't know if the thought is right but the main problem is how to translate this into php & mysql. Is there anybody who can help me with that?
By the way, my table has two columns, id and name...