0
I have the code:
 for ($i=0; $i < count($descricao); $i++) {
			$id_caixa_hoje = $linha['id_caixa_hoje'];  
			$valor_formatado[$i] = abs($valor[$i]);  
			
 		$inserir = mysql_query("INSERT INTO caixa_valores_extras (id_caixa, valor, descricao, funcionario) VALUES ('$id_caixa_hoje', '$valor_formatado[$i]', '$descricao[$i]', '$id_sessao')") or die("Erro: ".mysql_error());
       if($inserir == true){
       	echo "<script>alert('Informações gravadas com sucesso');</script><meta http-equiv='refresh' content='0'>";
       
       } else {
       	echo "<script>alert('Erro. Falha ao gravar as Informações:');</script><meta http-equiv='refresh' content='0'>";
       } // Esta chave fecha o  if($inserir == true){
        } // Esta chave fecha o laço for         
For example, if in my form I repeat a certain given 3 times,
instead of php displaying the success message only once, it displays the three times.
How can I get a single success message to be displayed at the end of the three INSERT process.

