$result = mysqli_query( $link,"SELECT $rowcarouselimage FROM $table WHERE $rowcarouselimage <> '' and $rowcarouselimage IS NOT NULL");
$id = 1;
while($row = mysqli_fetch_row($result)){
$resultcarousel = $_POST['resultcarousel$id'];
$resultrow = mysqli_query( $link,"UPDATE $table SET $rowcarouselimage = '$resultcarousel' WHERE $rowcarouselimage <> '' and $rowcarouselimage IS NOT NULL");
$id++;
}