My question is whether I have the following form,
<form name="frm_warning" id="box-register" method="POST" action="controllerWarning.php">
<h2 class="m-t-0 m-b-15">Warning</h2>
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="data-table" class="table">
<thead>
<tr>
<th>Chamado Numero</th>
<th>Nome</th>
<th>Telefone</th>
<th>Numero de tentativas</th>
<th>Ultima Tentativa</th>
<th>Zerar Tentativas?</th>
</tr>
</thead>
<tbody>
<?php
$query = sprintf("select * from ivr_contatos, ivr_campanha,ivr_business where ivr_contatos.campanha = ivr_campanha.id and ivr_business.idvisita = ivr_contatos.codigo and ivr_contatos.status = 0 and tentativas >= qtdtentativas" );
$result = Populator::ConsultaDB($query);
while ($resultado = pg_fetch_array($result) ) {
$chamado = $resultado['numerochamado'];
$nome = $resultado['nome'];
$telefone = $resultado['telefone'];
$tentativa = $resultado['tentativas'];
$lastAttempt = $resultado['atualizado'];
$dataconvertida = date('d/m/Y H:i:s', strtotime($lastAttempt));
$codigo = $resultado['codigo'];
echo '
<tr>
<td align="center">'.$chamado.'</td>
<td>'.$nome.'</td>
<td>'.$telefone.'</td>
<td align="center">'.$tentativa.'</td>
<td>'.$dataconvertida.'</td>
<td><input type="checkbox" class="marcar" id="check" value='.$codigo.' name="check[]"/></td>
</tr>
';
}
?>
</tbody>
</table>
</div>
</div>
</div>
<input type="button" value="Salvar" onclick="Confirma()" class="btn btn-sm m-r-5" />
<p id="demo"></p>
</form>
where I call a confirmation message via javascript:
<script type="text/javascript">
function Confirma(){
var txt;
if(confirm("Deseja zerar as tentativas dos contatos selecionados?")){
txt = "Zerou as tentativas";
}else{
txt = "Não zerou as tentativas";
}
document.getElementById("demo").innerHTML = txt;
}
</script>
where is the field txt="Zerou attempts"; I would like to send to action controllerwarning.php which is where I make the inclusion in the action bank that I am performing.