<?php

include "conexao.php";



//$array =  urldecode($_POST['json']);

$array = $_POST['json'];


$array = json_decode($array);


print_r($array);


foreach($array->json as $value){

    if($value->envio == 1){      
       $query = "UPDATE parcela_cobranca SET sucesso = 1 WHERE idparcela_cobranca = $value->emailId";
    }else{
       $query = "UPDATE parcela_cobranca SET erro = 1 WHERE idparcela_cobranca = $value->emailId";
    }

    
    mysqli_query($db, $query);

}




