No it's working now :) The only issue I'm having now is I don't think that the sort id's are updating into the db
Code:
<?php
include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("classes/class_pagination.php");
include("css/pagination.css");
include("inc/lang.php");
//***************//
// START SCRIPT //
//***************//
if ($_POST)
{
$userID = $_COOKIE['auid'];
foreach($_POST['orderaid'] as $orderID => $aid)
{
$adopts->query('REPLACE INTO ' . $prefix . 'sort_adoptables (`user_id`, `adoptable_id`, `sorting_id`)
VALUES ("' . addslashes($userID) . '", "' . addslashes($aid) . '", "' . addslashes($orderID) . '")');
}
echo '<p>Adoptables have been rearranged</p>';
}
?>