=1 && $box!="" && $box!=" ")$boxy[]=$box; } for($i=1;$i<=count($boxy);$i++){ $z="update ecmpricebooks_ecmproducts set position='".$i."' where deleted='0' and ecmproduct_id='".$boxy[$i-1]."' and ecmpricebook_id='".$_REQUEST['record']."'"; if($GLOBALS['db']->query($z))$ok=1; else $error="Error"; } if($error)print $error; else print "Saved"; exit; ?>