Sorting seats with PHP and JS