Code: Select all
$size = count($_POST['tags']);
$i = 0;
while ($i < $size)
{
$order= $_POST['order'][$i];
$hpid = $_POST['tags'][$i];
$updateposts = "UPDATE posts SET order='$order' WHERE hpid='$hpid' ";
mysql_query($query) or die ("an error has occured!");
++$i;
}
Code: Select all
$size = count($_POST['tags']);
$i = 0;
while ($i < $size)
{
$order= $_POST['order'][$i];
$hpid = $_POST['tags'][$i];
$updateposts = "UPDATE `posts` SET `order`='$order' WHERE `hpid`='$hpid' ";
mysql_query($query) or die ("an error has occured!");
++$i;
}