1
mirror of https://github.com/jakejarvis/spoons.git synced 2025-04-26 13:28:27 -04:00
spoons/sort_save.php

10 lines
292 B
PHP

<?php
include('config.php');
include('db_connect.php');
$order_array = explode(",", $_POST['order']);
foreach($order_array as $key => $value) {
echo $value . ' > ' . $key . "\n";
mysql_query("UPDATE spooners SET order_num = " . $key . " WHERE id = " . $value) or die(mysql_error());
}
?>