<?php
  
      include("db.php");
	    
      $counterCurrency=$_POST['take_currencyId'];
      $take_customerid=$_POST['take_customerid'];
      $ii=$_POST['ii'];
        
	   for($h=0;$h<= $ii;$h++){
	     
	    $all_Array=$_POST['all_Array'][$h];
		 
		//===first
		$statment_to_empty_sql="UPDATE `customer_statement` SET `check_point` = '0' WHERE `id` = '$all_Array'";
		$statment_to_empty_query= $db ->query($statment_to_empty_sql);
		//===first
	} 
    for($f=0;$f<= $ii;$f++){
	    echo $checkBox_id=$_POST['check_box'][$f];
		echo "<br>";
		//===first
		$back_to_empty_sql="UPDATE `customer_statement` SET `check_point` = '1' WHERE `id` = '$checkBox_id'";
		$back_to_empty_query= $db ->query($back_to_empty_sql);
		 
		//===first
		header("location:customer_statement.php?customerID=$take_customerid&currency_id=$counterCurrency");
	}
    
  
 
?>  
 
 