$item) { if (isnum($position) && isnum($item)) { $result = dbquery("UPDATE ".DB_SITE_LINKS." SET link_order='".($position + 1)."' WHERE link_id='".$item."'"); } } } if ($result) { header('Content-Type: application/json'); echo json_encode(['status' => 200]); }