I've been trying for some time to develop a script that will allow a user to specify a customized display order for the images in a photo gallery. I've got the idea of adding a "display_order" column in the database, and how to update that column using form submit values in php, but I can't figure out the client-side aspect of dynamically re-ordering and assigning place values to all the images.

facebook photo albums are a good example of how I'd like to be able to re-order images, though text-based ordering ("move up" / "move down") is okay too. I've been searching for scripts to use as reference, but I haven't been able to find anything. I know such scripts exist, but I don't know what they're called.

Any help would be appreciated. Thanks!